aboutsummaryrefslogtreecommitdiffstats
path: root/python/collateral
diff options
context:
space:
mode:
Diffstat (limited to 'python/collateral')
-rw-r--r--python/collateral/baml_fcm.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/collateral/baml_fcm.py b/python/collateral/baml_fcm.py
index fc3861d9..fa3e120e 100644
--- a/python/collateral/baml_fcm.py
+++ b/python/collateral/baml_fcm.py
@@ -52,7 +52,7 @@ def collateral(d, positions, engine):
compare_notionals(df, positions, "BAML")
positions["dirtyupfront"] = df.reindex(positions.index)["DIRTYUPFRONT"]
positions["amount"] = positions["notional"] * positions["dirtyupfront"]
- positions.folder = positions.folder.map(
+ positions.folder = positions.folder.replace(
{
"HEDGE_MBS": "MBSCDSCSH",
"SER_ITRXCURVE": "SER_ITRXCVCSH",
@@ -63,6 +63,14 @@ def collateral(d, positions, engine):
"HYINX": "TCSH",
}
)
+
+ def aux(row):
+ if row.folder == "XCURVE":
+ return "SER_IGCVECSH" if row.currency == "USD" else "SER_ITRXCVCSH"
+ else:
+ return row.folder
+
+ positions.folder = positions.apply(aux, axis=1)
df = (
positions.groupby("folder")
.agg({"amount": "sum", "currency": "first"})