diff options
| -rw-r--r-- | python/load_indicative.py | 8 | ||||
| -rw-r--r-- | sql/et_tables.sql | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/python/load_indicative.py b/python/load_indicative.py index db5ac7c3..ebe46699 100644 --- a/python/load_indicative.py +++ b/python/load_indicative.py @@ -42,15 +42,15 @@ def upload_cusip_data(conn, filename): line['updatedate'] = dealupdate[dealname] try: for key in ['Curr Balance', 'Orig Balance', 'Orig Attachment Point', - 'Curr Attachment Point (def at par)', 'Orig Detachment Point', - 'Curr Detachment Point (def at par)', 'Factor', 'Coupon', 'Floater Spread']: + 'Curr Attachment Point (def at MV)', 'Orig Detachment Point', + 'Curr Detachment Point (def at MV)', 'Factor', 'Coupon', 'Floater Spread']: if line[key]: line[key] = sanitize_float(line[key]) line[key] = convertToNone(line[key]) except ValueError: continue - line['Curr Attachment Point'] = line['Curr Attachment Point (def at par)'] - line['Curr Detachment Point'] = line['Curr Detachment Point (def at par)'] + line['Curr Attachment Point'] = line['Curr Attachment Point (def at MV)'] + line['Curr Detachment Point'] = line['Curr Detachment Point (def at MV)'] if "Curr Moody" not in line: line['Curr Moody'] = line['Orig Moody'] sqlstring = "INSERT INTO cusip_universe(Cusip, ISIN, \"Bloomberg Ticker\", dealname, tranche, " \ diff --git a/sql/et_tables.sql b/sql/et_tables.sql index e6d5082a..af13c782 100644 --- a/sql/et_tables.sql +++ b/sql/et_tables.sql @@ -479,7 +479,7 @@ CREATE OR REPLACE FUNCTION et_cusip_details(p_cusips VARIADIC varchar(10)[]) RETURN QUERY SELECT a.Orig_Moody, a.Curr_Moody, NULL, b."Deal Name", b.manager, NULL, a.Spread/100, a.Coupon/100, b."Deal Issue Date", b."Reinv End Date", b.Maturity, e.stalepercentage, greatest(b."CDO Percentage"/100, e.cdopercentage), e.wapbasis, - e.dealspread5y, e.dealspread, a.subordination, a.thickness, NULL, d.updatedate, + e.dealspread5y, e.dealspread, a.curr_attach/100, (a.curr_detach-a.curr_attach)/100, NULL, d.updatedate, d.delta, d.duration, d.wal, d.price FROM latest_cusip_universe a LEFT JOIN latest_clo_universe b ON a.dealname = b.dealname |
