diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/collateral/baml_fcm.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/collateral/baml_fcm.py b/python/collateral/baml_fcm.py index a7c960ed..fc3861d9 100644 --- a/python/collateral/baml_fcm.py +++ b/python/collateral/baml_fcm.py @@ -47,6 +47,8 @@ def collateral(d, positions, engine): ) df["DIRTYUPFRONT"] = (df.MTM + df.ACCRUEDCPN) / df.NOTIONAL df.index.names = ["security_id", "maturity"] + # dropped old versions (trades should be offsetting + df = df[df.groupby(["security_id", "maturity"])["NOTIONAL"].sum() != 0.0] compare_notionals(df, positions, "BAML") positions["dirtyupfront"] = df.reindex(positions.index)["DIRTYUPFRONT"] positions["amount"] = positions["notional"] * positions["dirtyupfront"] |
