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.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/markit/import_quotes.py b/python/markit/import_quotes.py
index d3ac8a29..203e1397 100644
--- a/python/markit/import_quotes.py
+++ b/python/markit/import_quotes.py
@@ -18,7 +18,7 @@ def convert(x):
return None
index_list = ['HY9', 'HY10'] + ['HY' + str(s) for s in range(15, 27)] + ['IG9'] + \
- ['IG' + str(s) for s in range(16, 28)] + \
+ ['IG' + str(s) for s in range(16, 29)] + \
['XO' + str(s) for s in range(22, 27)] + \
['EU9'] + \
['EU' + str(s) for s in range(19, 27)]
@@ -51,7 +51,7 @@ def get_markit_bbg_mapping(database, basketid_list, workdate):
## 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 strucutre
+ ## therefore we keep them in a set structure
markit_bbg_mapping[key].add(tuple(line['cds_curve']))
database.commit()
return (all_tickers, markit_bbg_mapping)
@@ -80,7 +80,8 @@ def insert_cds(database, workdate):
filename = "cds eod {0:%Y%m%d}.csv".format(workdate)
colnames = ['Upfront'+tenor for tenor in ['6m', '1y', '2y', '3y', '4y', '5y', '7y', '10y']]
sqlstr = "INSERT INTO cds_quotes(date, curve_ticker, upfrontbid, upfrontask," \
- "runningbid, runningask, source, recovery) VALUES(%s, %s, %s, %s, %s, %s, %s, %s)"
+ "runningbid, runningask, source, recovery) VALUES(%s, %s, %s, %s, %s, %s, %s, %s) " \
+ "ON CONFLICT DO NOTHING"
tickers_found = set([])
with database.cursor() as c: