diff options
Diffstat (limited to 'python/markit/import_quotes.py')
| -rw-r--r-- | python/markit/import_quotes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py index 9432ef85..c0ab7bed 100644 --- a/python/markit/import_quotes.py +++ b/python/markit/import_quotes.py @@ -45,14 +45,14 @@ def get_markit_bbg_mapping(database, basketid_list, workdate): "WHERE basketid=ANY(%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'], - line['short_code'], float(line['spread'])/10000) + all_tickers.add((line.markit_ticker, line.markit_tier)) + key = (line.markit_ticker, line.markit_tier, line.currency, + 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) ## therefore we keep them in a set structure - markit_bbg_mapping[key].add(tuple(line['cds_curve'])) + markit_bbg_mapping[key].add(tuple(line.cds_curve)) database.commit() return (all_tickers, markit_bbg_mapping) |
