aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/markit/import_quotes.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py
index bb53fb03..b7d4ee5d 100644
--- a/python/markit/import_quotes.py
+++ b/python/markit/import_quotes.py
@@ -36,22 +36,16 @@ DOC_CLAUSE_MAPPING = {'Full Restructuring': 'MM',
'Modified Modified Restructurin': 'MM'}
def get_markit_bbg_mapping(database, basketid_list, workdate):
- if workdate >= datetime.date(2014, 9, 19):
- doc_clause_mapping = DOC_CLAUSE_MAPPING14
- else:
- doc_clause_mapping = DOC_CLAUSE_MAPPING
markit_bbg_mapping = defaultdict(set)
all_tickers = set([])
with database.cursor() as c:
c.execute("SELECT markit_ticker, markit_tier, spread, currency, cds_curve, "
- " doc_clause FROM historical_cds_issuers(%s) where index_list && %s",
+ " short_code FROM historical_cds_issuers(%s) where index_list && %s",
(workdate, list(basketid_list)))
for line in c:
all_tickers.add((line['markit_ticker'], line['markit_tier']))
key = (line['markit_ticker'], line['markit_tier'], line['currency'],
- doc_clause_mapping[line['doc_clause']], float(line['spread'])/10000)
- if key == ('CESEOP', 'SNRFOR', 'USD', 'XR14', 0.05):
- key = ('CESEOP', 'SNRFOR', 'USD', 'XR', 0.05)
+ line['short_code'], float(line['spread'])/10000)
## each markit ticker can be mapped to multiple bbg tickers
## these bbg tickers can have different curves (ok)
## or same curves (not ok since date, curve_ticker needs to be unique)