diff options
Diffstat (limited to 'python/mark_swaptions.py')
| -rw-r--r-- | python/mark_swaptions.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/mark_swaptions.py b/python/mark_swaptions.py index 671467f9..d9edade8 100644 --- a/python/mark_swaptions.py +++ b/python/mark_swaptions.py @@ -26,8 +26,10 @@ def get_swaptionvol(index, series, strike, expiry, date, engine): r = engine.execute( "SELECT ref, vol_payer AS payer, vol_receiver AS receiver, " \ "vol_payer_black AS payer_black, vol_receiver_black AS receiver_black " \ - "FROM swaption_calib LEFT JOIN swaption_ref_quotes " \ - "USING (quotedate, expiry, index, series) WHERE index = %s " \ + "FROM swaption_calib " \ + "LEFT JOIN swaption_quotes USING (quote_id) " \ + "LEFT JOIN swaption_ref_quotes USING (ref_id) "\ + "WHERE index = %s " \ "AND series = %s AND strike=%s AND expiry = %s AND quotedate::date=%s " \ "ORDER BY quotedate desc", (index, series, strike, expiry, date)) |
