diff options
Diffstat (limited to 'python/risk')
| -rw-r--r-- | python/risk/tranches.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/risk/tranches.py b/python/risk/tranches.py index 18f1b0f5..bb3bf4f8 100644 --- a/python/risk/tranches.py +++ b/python/risk/tranches.py @@ -6,7 +6,7 @@ logger = logging.getLogger(__name__) def get_tranche_portfolio(date, conn, by_strat=False, fund="SERCGMAST", **kwargs): if by_strat: - sql_string = "SELECT * from list_tranche_positions_by_strat(%s, %s)" + sql_string = "SELECT * FROM list_tranche_positions_by_strat(%s, %s)" else: sql_string = ( "SELECT * FROM list_cds(%s, %s) " @@ -69,6 +69,7 @@ def insert_tranche_portfolio(portf, conn): "index_refspread", "index_duration", "hy_equiv", + "ir_dv01", ] update_str = ",".join(f"{c} = EXCLUDED.{c}" for c in cols[2:]) sql_str = ( @@ -119,6 +120,7 @@ def insert_tranche_portfolio(portf, conn): * 10000, float(trade._index.duration()), trade.hy_equiv, + trade.irdv01, ), ) conn.commit() |
