diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/dawn.sql | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index ece9de82..44f3446a 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -1086,7 +1086,7 @@ CREATE FOREIGN TABLE risk_num_per_quote( tenor tenor, index_price float, index_basis float, - "index_EL" float, + index_expected_loss float, index_duration float, index_theta float, attach smallint, @@ -1098,7 +1098,7 @@ CREATE FOREIGN TABLE risk_num_per_quote( theta float, corr01 float, duration float, - "EL" float, + expected_loss float, trancheupfrontmid float, trancherunningmid float, indexrefprice float, @@ -1411,3 +1411,19 @@ for t in (df.itertuples(index=False)): yield [t[0], t[1]] + [None if np.isnan(v) else v for v in t[2:]] $$ LANGUAGE plpythonu; + + +CREATE TABLE tranche_marks( + date date NOT NULL, + id integer NOT NULL REFERENCES cds, + clean_nav float, + accrued float, + tranche_duration float, + spread float, + delta float, + gamma float, + theta float, + corr_attach float, + corr_detach float, + index_duration float, + PRIMARY KEY(date, id)) |
