diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/clo_universe.py | 3 | ||||
| -rw-r--r-- | python/cusip_universe.py | 5 | ||||
| -rw-r--r-- | python/load_bloomberg_data.py | 1 | ||||
| -rw-r--r-- | python/load_intex_collateral.py | 3 | ||||
| -rw-r--r-- | python/load_markit_data.py | 1 |
5 files changed, 10 insertions, 3 deletions
diff --git a/python/clo_universe.py b/python/clo_universe.py index 02343884..ff0aa422 100644 --- a/python/clo_universe.py +++ b/python/clo_universe.py @@ -12,7 +12,7 @@ if os.name=='nt': elif os.name=='posix': root = "/home/share/CorpCDOs/" -workdate = '2013-01-04' +workdate = '2013-01-16' universe = os.path.join("data", "clo_universe_intex_" + workdate + ".txt") def convertToNone(s): @@ -79,3 +79,4 @@ conn.commit() cursor.close() conn.close() +print "done" diff --git a/python/cusip_universe.py b/python/cusip_universe.py index f90523b9..eceb3325 100644 --- a/python/cusip_universe.py +++ b/python/cusip_universe.py @@ -21,7 +21,7 @@ conn = psycopg2.connect(database="ET", cursor = conn.cursor() # cursor.execute("delete from cusip_universe") -workdate = '2013-01-15' +workdate = '2013-01-17' count = 0 def sanitize_float(intex_float): @@ -61,6 +61,8 @@ for cusip_universe_file in os.listdir(os.path.join(root, "data", "Trinfo_" + wor if line[key]: line[key] = sanitize_float(line[key]) line[key] = convertToNone(line[key]) + if "Curr Moody" not in line: + line['Curr Moody'] = line['Orig Moody'] sqlstring = "INSERT INTO cusip_universe(cusip, ISIN, dealname, tranche," \ "coupon, Orig_Balance, Curr_Balance, Factor, Orig_moody, Curr_moody, " \ "Orig_attach, Orig_detach, Curr_attach, Curr_detach, Floater_Index," \ @@ -76,3 +78,4 @@ for cusip_universe_file in os.listdir(os.path.join(root, "data", "Trinfo_" + wor cursor.close() conn.close() +print "done" diff --git a/python/load_bloomberg_data.py b/python/load_bloomberg_data.py index 9aec9cff..b5c0669d 100644 --- a/python/load_bloomberg_data.py +++ b/python/load_bloomberg_data.py @@ -72,3 +72,4 @@ for filename in os.listdir(root): cursor.close()
conn.close()
+print "done"
diff --git a/python/load_intex_collateral.py b/python/load_intex_collateral.py index 9e3a1c07..de1b6c21 100644 --- a/python/load_intex_collateral.py +++ b/python/load_intex_collateral.py @@ -29,7 +29,7 @@ def sanitize_float(intex_float): conn = psycopg2.connect(database="ET", user="et_user", password="Serenitas1", host="192.168.1.108") cursor = conn.cursor() -workdate = "2013-01-04" +workdate = "2013-01-16" with open(os.path.join(root, "data", "clo_universe_intex_" + workdate + ".txt")) as fh: dr = csv.DictReader(fh, dialect='excel-tab') @@ -123,3 +123,4 @@ for dealname in os.listdir(os.path.join(root, "data", "Collaterals_" + workdate) cursor.close() conn.close() +print "done" diff --git a/python/load_markit_data.py b/python/load_markit_data.py index b29cfd18..d2188952 100644 --- a/python/load_markit_data.py +++ b/python/load_markit_data.py @@ -59,3 +59,4 @@ for filename in os.listdir(root): "VALUES({1})".format(",".join(sql_fields), ",".join(["%s"] * len(sql_fields))) cursor.execute(sqlstring, tuple(row) + (date,)) conn.commit() +print "done" |
