aboutsummaryrefslogtreecommitdiffstats
path: root/python/position.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/position.py')
-rw-r--r--python/position.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/python/position.py b/python/position.py
index e7afc4df..064feb41 100644
--- a/python/position.py
+++ b/python/position.py
@@ -22,19 +22,10 @@ def get_list(
engine,
params=(workdate, asset_class, include_unsettled, fund),
)
- positions.loc[
- positions.identifier.str.len() <= 11, "cusip"
- ] = positions.identifier.str.slice(stop=9)
- positions.loc[
- positions.identifier.str.len() == 12, "isin"
- ] = positions.identifier
else:
positions = pd.read_sql_table("securities", engine)
- positions["bbg_id"] = (
- positions.cusip.where(positions.cusip.notnull(), positions["isin"])
- + " "
- + positions.bbg_type
- )
+ positions.identifier = positions.figi
+ positions["bbg_id"] = positions.identifier + " " + positions.bbg_type
positions.set_index("bbg_id", inplace=True)
return positions