aboutsummaryrefslogtreecommitdiffstats
path: root/python/collateral/cs.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/collateral/cs.py')
-rw-r--r--python/collateral/cs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/collateral/cs.py b/python/collateral/cs.py
index b70b32b9..ad36151c 100644
--- a/python/collateral/cs.py
+++ b/python/collateral/cs.py
@@ -52,6 +52,7 @@ def get_collateral(d: datetime.date, fund):
"Serenitas": "SerenitasCGMF",
"BowdSt": "BostonBPStLLC",
}
+ collat = {}
for collat_type in ("RVM", "IM", "FXIM"):
pdf_file = (
DATA_DIR
@@ -62,7 +63,7 @@ def get_collateral(d: datetime.date, fund):
if e.text == "Cash USD (US Dollar)":
next(g)
value = next(g).text
- collat += float(
+ collat[collat_type] = float(
value.strip().replace(",", "").replace("(", "-").replace(")", "")
)
break
@@ -121,7 +122,7 @@ def load_cs_positions(d: datetime.date, fund: str, legacy=False):
def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
- collateral = get_collateral(next_business_day(d), fund)
+ collateral = sum(get_collateral(next_business_day(d), fund).values())
try:
df = load_cs_positions(d, fund)
except ValueError as e: