aboutsummaryrefslogtreecommitdiffstats
path: root/python/collateral
diff options
context:
space:
mode:
Diffstat (limited to 'python/collateral')
-rw-r--r--python/collateral/barclays.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/collateral/barclays.py b/python/collateral/barclays.py
index 1adf3077..92ada007 100644
--- a/python/collateral/barclays.py
+++ b/python/collateral/barclays.py
@@ -10,7 +10,7 @@ paths = {
}
-def load_file(d, fund="Serenitas"):
+def load_file(d, fund, pattern):
file_mapping = {
"Serenitas": "Serenitas Credit Gamma Master Fund LP",
"Selene": "ISO Selene", # WIll replace to the correct name once we get it
@@ -18,7 +18,7 @@ def load_file(d, fund="Serenitas"):
try:
fname = next(
(DAILY_DIR / fund / "BARCLAYS_reports").glob(
- f"Exposure Report for {file_mapping[fund]} - Regulatory as at {d:%d %b %Y}*"
+ f"{pattern}*{file_mapping[fund]} - Regulatory as at {d:%d %b %Y}*"
)
)
except StopIteration:
@@ -42,7 +42,7 @@ def download_files(em, count=20, *, fund="Serenitas", **kwargs):
def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
collateral = 0
- df = load_file(d, fund)
+ df = load_file(d, fund, "Exposure Report")
df = df[["Trade Reference", "Exposure (USD)", "Ind Amt (USD)"]]
df["Trade Reference"] = df["Trade Reference"].astype(str)
df = df.merge(