diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/collateral_calc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/collateral_calc.py b/python/collateral_calc.py index 9a566fa6..f8264d7f 100644 --- a/python/collateral_calc.py +++ b/python/collateral_calc.py @@ -135,6 +135,10 @@ def sg_collateral(d): # pd.DataFrame({"Reference Entity": 'CDX-NAIGS29V1-5Y', "Mtm Value": 0.}, # index=['T2201711010000A3K20000045561220U'])) df = df_activity.join(df_position) + # expired trade (need to figure out how to get them from the report) + # df.loc['N201811090000A3K215946925849228U1', 'Mtm Value'] = 0. + # df.loc['N201811090000A3K215946925849228U1', 'Reference Entity'] = 'CDX-NAIGS31V1-5Y' + df['Collateral'] = df['Mtm Value'] - df['Amount'] ref_entity = df['Reference Entity'].str.split("-", expand=True) del ref_entity[0] |
