diff options
Diffstat (limited to 'python/risk/swaptions.py')
| -rw-r--r-- | python/risk/swaptions.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/risk/swaptions.py b/python/risk/swaptions.py index c3410e71..6b835d10 100644 --- a/python/risk/swaptions.py +++ b/python/risk/swaptions.py @@ -6,7 +6,7 @@ from psycopg2 import sql logger = logging.getLogger(__name__) -def get_swaption_portfolio(date, conn, **kwargs): +def get_swaption_portfolio(date, conn, fund="SERCGMAST", **kwargs): with conn.cursor() as c: c.execute( "SELECT swaptions.id, folder, dealid, (notional - terminated_amount) AS notional " @@ -16,8 +16,9 @@ def get_swaption_portfolio(date, conn, **kwargs): "USING (dealid) " "WHERE notional IS DISTINCT FROM terminated_amount " "AND expiration_date > %s AND trade_date <= %s " - "AND swap_type='CD_INDEX_OPTION' ORDER BY expiration_date, strike", - (date, date, date), + "AND swap_type='CD_INDEX_OPTION' " + "AND fund=%s ORDER BY expiration_date, strike", + (date, date, date, fund), ) try: trade_ids, folders, deal_ids, notionals = zip(*c) |
