diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/collateral/__main__.py | 9 | ||||
| -rw-r--r-- | python/collateral/baml_fcm.py | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/python/collateral/__main__.py b/python/collateral/__main__.py index 8351d881..294b26e8 100644 --- a/python/collateral/__main__.py +++ b/python/collateral/__main__.py @@ -95,7 +95,12 @@ def run_collateral(cp, fund, positions, positions_rates, workdate, engine): df = {} -fcm_mapping = {"baml_fcm": "BAML", "wells": "WF", "gs_fcm": "GS"} +fcm_mapping = { + ("baml_fcm", "Serenitas"): "BAML", + ("wells", "Serenitas"): "WF", + ("gs_fcm", "BowdSt"): "GS", + ("baml_fcm", "Selene"): "BOAFC", +} fund_mapping = { "Serenitas": "SERCGMAST", "Brinker": "BRINKER", @@ -111,7 +116,7 @@ for fund in funds: "folder, notional, currency " "FROM list_cds_positions_by_strat_fcm(%s, %s, %s)", dawn_engine, - params=(workdate, fcm_mapping[fcm], fund_mapping[fund]), + params=(workdate, fcm_mapping[fcm, fund], fund_mapping[fund]), index_col=["security_id", "maturity"], parse_dates=["maturity"], ) diff --git a/python/collateral/baml_fcm.py b/python/collateral/baml_fcm.py index 9ce7d8bd..0e82c1c7 100644 --- a/python/collateral/baml_fcm.py +++ b/python/collateral/baml_fcm.py @@ -15,11 +15,15 @@ def download_files(*args, fund="Serenitas", **kwargs): def load_csv(file_type, fund, d, **kwargs): + if fund == "Serenitas": + tag = "LMCG" + else: + tag = "Selene" return pd.read_csv( DAILY_DIR / fund / "BAML_reports" - / f"OTC_Open_Positions_-_{file_type}_-_LMCG_{d:%Y%m%d}.CSV", + / f"OTC_Open_Positions_-_{file_type}_-_{tag}_{d:%Y%m%d}.CSV", **kwargs, ) |
