diff options
Diffstat (limited to 'python/collateral/__main__.py')
| -rw-r--r-- | python/collateral/__main__.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/python/collateral/__main__.py b/python/collateral/__main__.py index 01d2a283..7c8cbf6b 100644 --- a/python/collateral/__main__.py +++ b/python/collateral/__main__.py @@ -42,13 +42,14 @@ counterparties = ( "gs_fcm", "jpm", ) +funds = ("Serenitas", "Brinker", "BowdSt", "Selene") if args.download: from serenitas.utils.exchange import ExchangeMessage em = ExchangeMessage() for cp in counterparties: cp_mod = import_module(f".{cp}", "collateral") - for fund in ("Serenitas", "Brinker", "BowdSt"): + for fund in funds: cp_mod.download_files(em, fund=fund) workdate = prev_business_day(args.workdate) @@ -63,6 +64,10 @@ cp_dict = { "fcms": ("gs_fcm",), "isda_cps": ("ms", "bnp", "gs", "baml_isda", "cs", "jpm"), }, + "Selene": { + "fcms": ("baml_fcm",), + "isda_cps": ("baml_isda",), + }, } @@ -91,9 +96,14 @@ def run_collateral(cp, fund, positions, positions_rates, workdate, engine): df = {} fcm_mapping = {"baml_fcm": "BAML", "wells": "WF", "gs_fcm": "GS"} -fund_mapping = {"Serenitas": "SERCGMAST", "Brinker": "BRINKER", "BowdSt": "BOWDST"} +fund_mapping = { + "Serenitas": "SERCGMAST", + "Brinker": "BRINKER", + "BowdSt": "BOWDST", + "Selene": "ISOSEL", +} -for fund in ("Serenitas", "Brinker", "BowdSt"): +for fund in funds: bilat_positions = get_bilateral_trades(workdate, fund_mapping[fund], dawn_engine) for fcm in cp_dict[fund]["fcms"]: positions = pd.read_sql_query( @@ -115,7 +125,6 @@ for fund in ("Serenitas", "Brinker", "BowdSt"): df[(fund, fcm.upper())] = run_collateral( fcm, fund, positions, positions_rates, workdate, dawn_engine ) - for cp in cp_dict[fund]["isda_cps"]: df[(fund, cp.upper())] = run_collateral( cp, fund, bilat_positions, None, workdate, dawn_engine |
