aboutsummaryrefslogtreecommitdiffstats
path: root/python/markit/import_quotes.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/markit/import_quotes.py')
-rw-r--r--python/markit/import_quotes.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py
index e21acb8e..c441e092 100644
--- a/python/markit/import_quotes.py
+++ b/python/markit/import_quotes.py
@@ -56,20 +56,20 @@ 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))
+ for rec in c:
+ all_tickers.add((rec.markit_ticker, rec.markit_tier))
key = (
- line.markit_ticker,
- line.markit_tier,
- line.currency,
- line.short_code,
- float(line.spread) / 10000,
+ rec.markit_ticker,
+ rec.markit_tier,
+ rec.currency,
+ rec.short_code,
+ float(rec.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(rec.cds_curve), (rec.company_id, rec.seniority)))
database.commit()
return (all_tickers, markit_bbg_mapping)