diff options
Diffstat (limited to 'python/collateral')
| -rw-r--r-- | python/collateral/gs.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/collateral/gs.py b/python/collateral/gs.py index 61bc8f95..a57b4e5d 100644 --- a/python/collateral/gs.py +++ b/python/collateral/gs.py @@ -44,6 +44,8 @@ def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs): missing_ids = missing_ids[~missing_ids.str.startswith("FX")] if not missing_ids.empty: raise ValueError(f"{missing_ids.tolist()} not in the database") + # we allocate all the FX collateral to tranches + df.loc[df["Transaction Type"] == "FX", "folder"] = "TCSH" df = df[["folder", "NPV (USD)", "Initial Margin Required"]] df = df.groupby("folder").sum() df = df.sum(axis=1).to_frame(name="Amount") |
