aboutsummaryrefslogtreecommitdiffstats
path: root/python/risk/swaptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/risk/swaptions.py')
-rw-r--r--python/risk/swaptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/risk/swaptions.py b/python/risk/swaptions.py
index ea8dc676..3eb1dd54 100644
--- a/python/risk/swaptions.py
+++ b/python/risk/swaptions.py
@@ -9,7 +9,8 @@ logger = logging.getLogger(__name__)
def get_swaption_portfolio(date, conn, **kwargs):
with conn.cursor() as c:
c.execute(
- "SELECT id, folder, dealid FROM swaptions "
+ "SELECT swaptions.id, folder, dealid FROM swaptions "
+ "LEFT JOIN terminations USING (dealid) "
"WHERE (termination_date is NULL or termination_date > %s) "
"AND expiration_date > %s AND trade_date <= %s "
"AND swap_type='CD_INDEX_OPTION' ORDER BY expiration_date, strike",