diff options
Diffstat (limited to 'python/risk')
| -rw-r--r-- | python/risk/tranches.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/risk/tranches.py b/python/risk/tranches.py index 0e255e18..30d7f66f 100644 --- a/python/risk/tranches.py +++ b/python/risk/tranches.py @@ -54,6 +54,7 @@ def insert_tranche_portfolio(portf, conn): "delta", "gamma", "theta", + "theta_amount", "corr01", "tranche_factor", "upfront", @@ -63,6 +64,7 @@ def insert_tranche_portfolio(portf, conn): "index_refprice", "index_refspread", "index_duration", + "hy_equiv", ] update_str = ",".join(f"{c} = EXCLUDED.{c}" for c in cols[2:]) sql_str = ( @@ -95,6 +97,7 @@ def insert_tranche_portfolio(portf, conn): trade.delta, trade.gamma, theta, + theta * trade.notional * trade.tranche_factor * trade._index._fx, trade.corr01, trade.tranche_factor, trade.upfront, @@ -107,6 +110,7 @@ def insert_tranche_portfolio(portf, conn): ) * 10000, float(trade._index.duration()), + trade.hy_equiv, ), ) conn.commit() |
