aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/collateral/baml_isda.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/python/collateral/baml_isda.py b/python/collateral/baml_isda.py
index d8aebed0..f389713c 100644
--- a/python/collateral/baml_isda.py
+++ b/python/collateral/baml_isda.py
@@ -169,10 +169,19 @@ def load_excel(fname):
def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
+ match fund:
+ case "Serenitas":
+ tag = "TSLP"
+ case "BowdSt":
+ tag = "TLLC"
+ case "Selene":
+ tag = "INC"
report_date = d + BDay()
REPORTS_DIR = DAILY_DIR / fund / "BoA_reports"
try:
- fname = next(REPORTS_DIR.glob(f"Collat_*{report_date:%m%d%Y}_*.xls"))
+ fname = next(
+ REPORTS_DIR.glob(f"Collat_LMCG_INVESTMEN{tag}_CSA_{report_date:%m%d%Y}_*")
+ )
except StopIteration:
raise ValueError(f"no collateral data for date {report_date}")
df = pd.read_excel(fname, skiprows=6, skipfooter=6)
@@ -186,13 +195,6 @@ def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
except TypeError:
collateral = df.Notional.sum()
try:
- match fund:
- case "Serenitas":
- tag = "TSLP"
- case "BowdSt":
- tag = "TLLC"
- case "Selene":
- tag = "INC"
fname = next(
REPORTS_DIR.glob(f"301__LMCG_INVESTMEN{tag}_CSA_{report_date:%m%d%Y}_*")
)