aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/markit/import_quotes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py
index cd4152b3..088fa061 100644
--- a/python/markit/import_quotes.py
+++ b/python/markit/import_quotes.py
@@ -40,7 +40,9 @@ def get_markit_bbg_mapping(database, basketid_list, workdate):
all_tickers = set([])
with database.cursor() as c:
c.execute("SELECT markit_ticker, markit_tier, spread, currency, cds_curve, "
- " short_code FROM historical_cds_issuers(%s) where index_list && %s",
+ " short_code FROM historical_cds_issuers(%s) "
+ "JOIN basket_constituents USING (company_id, seniority) "
+ "WHERE basketid=ANY(%s)",
(workdate, list(basketid_list)))
for line in c:
all_tickers.add((line['markit_ticker'], line['markit_tier']))