aboutsummaryrefslogtreecommitdiffstats
path: root/python/swaption_pnl.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/swaption_pnl.py')
-rw-r--r--python/swaption_pnl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/swaption_pnl.py b/python/swaption_pnl.py
index 836cffdb..1f8b994f 100644
--- a/python/swaption_pnl.py
+++ b/python/swaption_pnl.py
@@ -115,7 +115,8 @@ def get_tranche_pv(
with conn.cursor() as c:
c.execute(
"SELECT upfront "
- "FROM cds WHERE trade_date=%s AND swap_type = 'CD_INDEX_TRANCHE'",
+ "FROM cds WHERE trade_date=%s AND swap_type='CD_INDEX_TRANCHE' "
+ "AND fund='SERCGMAST'",
(prev_day,),
)
for (fee,) in c:
@@ -169,7 +170,7 @@ if __name__ == "__main__":
df_instrument = get_swaption_pv(conn=dawndb, **vars(args))
pnl_index = df_index.pv.diff() + df_index.daily
- pnl_instrument = df_instrument.diff() + df_instrument.daily
+ pnl_instrument = df_instrument.pv.diff() + df_instrument.daily
pnl = pd.concat([pnl_index, pnl_instrument], keys=["index", pnl_type], axis=1)
print(
pd.concat(