aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/dawn.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 1fdfdb1f..faa80dc2 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -1364,7 +1364,7 @@ CREATE OR REPLACE FUNCTION list_swaption_positions_and_risks(IN p_date date, p_f
initial_margin double precision, latest_model_date date,
delta double precision, gamma double precision, vega double precision,
theta double precision, index index_type, series smallint, tenor tenor,
- duration double precision, indexfactor float) AS $$
+ duration double precision, portfolio portfolio, indexfactor float) AS $$
BEGIN
RETURN QUERY
-- TODO: fix the case of multiple index versions
@@ -1373,7 +1373,7 @@ SELECT DISTINCT ON (a.dealid) a.dealid, a.security_id, c.maturity,
a.option_type, a.strike, a.expiration_date, b.market_value,
coalesce(endbooknav, base_market_value),
f.ia, b.date, b.delta, b.gamma, b.vega,
- b.theta, c.index, c.series, c.tenor, d.duration, c.indexfactor
+ b.theta, c.index, c.series, c.tenor, d.duration, a.portfolio, c.indexfactor
FROM swaptions a
LEFT JOIN (SELECT * FROM swaption_marks where date <= p_date) b USING (dealid)
LEFT JOIN index_desc c ON a.security_id=redindexcode AND a.maturity=c.maturity