diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/import_quotes.py | 2 | ||||
| -rw-r--r-- | python/markit_cds.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/python/import_quotes.py b/python/import_quotes.py index 67362aab..26a21abd 100644 --- a/python/import_quotes.py +++ b/python/import_quotes.py @@ -97,7 +97,7 @@ def insert_cds_single(database, workdate, bbg_tickers, mkt_tuple): database.rollback() database.commit() -def insert_index(database, workdate): +def insert_index(engine, workdate): basedir = os.path.join(root, 'Tranche_data', 'Composite_reports') filenames = [os.path.join(basedir, f) for f in os.listdir(basedir) if 'Indices' in f] diff --git a/python/markit_cds.py b/python/markit_cds.py index e1622567..0096cc7e 100644 --- a/python/markit_cds.py +++ b/python/markit_cds.py @@ -56,6 +56,7 @@ if __name__=="__main__": download_cds_data(payload)
payload.update({'type':'CredIndex','version':4})
download_composite_data(payload)
+ engine = create_engine('postgresql://serenitas_user:Serenitas1@debian/serenitasdb')
insert_cds(serenitasdb, workdate.date())
- insert_index(serenitasdb, workdate.date())
+ insert_index(engine, workdate.date())
serenitasdb.close()
|
