aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 50af3d17..ea854239 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -845,6 +845,22 @@ RETURN QUERY EXECUTE sqlquery USING p_date, eur_fx, days;
END;
$$ LANGUAGE plpgsql;
+
+CREATE TABLE tranche_risk(
+ date date,
+ tranche_id integer REFERENCES cds(id),
+ clean_nav float,
+ accrued float,
+ theta float,
+ duration float,
+ delta float,
+ upfront float,
+ running float,
+ index_refprice float,
+ index_refspread float,
+ index_duration float,
+ PRIMARY KEY (date, tranche_id))
+
CREATE OR REPLACE function list_tranche_marks(p_date date)
RETURNS TABLE(security_id varchar(12), security_desc varchar(32), p_index index_type,
p_series smallint, p_version smallint, p_tenor tenor, maturity date,