diff options
Diffstat (limited to 'python/import_cds_quotes.py')
| -rw-r--r-- | python/import_cds_quotes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/import_cds_quotes.py b/python/import_cds_quotes.py index 835f40c7..430ff190 100644 --- a/python/import_cds_quotes.py +++ b/python/import_cds_quotes.py @@ -17,7 +17,7 @@ def get_current_tickers(connmlpdb, workdate): sqlstr = "SELECT markit_ticker, markit_tier, cds_curve from index_members(%s, %s)" markit_bbg_mapping = {} all_tickers = set([]) - for index in ['HY9', 'HY10', 'HY15', 'HY17', 'HY19', 'IG9', 'IG19', 'IG21']: + for index in ['HY9', 'HY10', 'HY15', 'HY17', 'HY19', 'HY21', 'IG9', 'IG19', 'IG21']: spread=0.05 if 'HY' in index else 0.01 with connmlpdb.cursor() as c: c.execute(sqlstr, (index, workdate)) @@ -41,6 +41,7 @@ def insert_cds(connmlpdb, workdate): tickers_found = set([]) with connmlpdb.cursor() as c: c.execute("DELETE from cds_quotes where date=%s", (workdate,)) + connmlpdb.commit() with open(os.path.join(root, "Tranche_data", "CDS", filename)) as fh: csvreader = csv.DictReader(fh) with connmlpdb.cursor() as c: |
