aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/collateral_calc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/collateral_calc.py b/python/collateral_calc.py
index 6f9bb047..6f21f234 100644
--- a/python/collateral_calc.py
+++ b/python/collateral_calc.py
@@ -151,7 +151,7 @@ def baml_collateral(d):
positions = positions.set_index('tenor', append=True)
positions['PERIOD'] = df_helper.loc[positions.index]
positions = positions.reset_index(['tenor']).set_index(['PERIOD'], append=True)
- df['DIRTYUPFRONT'] = df.VARMARGIN / df.NOTIONAL
+ df['DIRTYUPFRONT'] = (df.MTM + df.ACCRUEDCPN ) / df.NOTIONAL
df['DIRTYUPFRONT'] = df.DIRTYUPFRONT.where(df.BUYSELL == 'Sell', -df.DIRTYUPFRONT)
positions['dirtyupfront'] = df.loc[positions.index, 'DIRTYUPFRONT']
positions['amount'] = positions['notional'] * positions['dirtyupfront']