aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index dc24a865..8e3020c1 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -504,7 +504,7 @@ $$ LANGUAGE plpgsql;
CREATE OR REPLACE function list_cds_marks(p_date date, strat cds_strat DEFAULT NULL::cds_strat)
RETURNS TABLE(security_id varchar(12), security_desc varchar(32), p_index index_type, p_series smallint,
p_version smallint, tenor tenor, maturity date, notional float, factor float,
- name text, coupon float, duration float, price float, closespread float,
+ name text, coupon float, duration float, theta float, price float, closespread float,
clean_nav float, accrued float) AS $$
DECLARE
days integer;
@@ -525,12 +525,12 @@ sqlquery := format(
cds_globeop_name(a.security_id, a.fixed_rate, a.maturity, c.index, c.tenor)
FROM list_cds_positions(%s) a
LEFT JOIN index_desc c ON (a.security_id=c.redindexcode AND a.maturity=c.maturity)),
-index_price AS (SELECT index, series, version, d.tenor, closeprice, d.duration, d.closespread
+index_price AS (SELECT index, series, version, d.tenor, closeprice, d.duration, d.closespread, d.theta
FROM index_quotes d WHERE date=$1)
SELECT
temp.security_id, temp.security_desc, temp.index, temp.series, temp.version, temp.tenor,
temp.maturity, temp.notional, temp.fact, temp.cds_globeop_name, temp.fixed_rate/100,
- index_price.duration, index_price.closeprice, index_price.closespread,
+ index_price.duration, index_price.theta, index_price.closeprice, index_price.closespread,
(index_price.closeprice/100.-1) * temp.notional * temp.fact *
(CASE WHEN temp.currency = ''EUR'' THEN $2 ELSE 1 END),
temp.notional * temp.fixed_rate/100. * temp.fact * $3 / 360 *