aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/dawn.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 2326969b..5f0f00f3 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -1029,7 +1029,7 @@ END IF;
END;
$$ LANGUAGE plpgsql;
-CREATE OR REPLACE function list_cds_marks(p_date date, strat cds_strat DEFAULT NULL::cds_strat)
+CREATE OR REPLACE function list_cds_marks(p_date date, strat cds_strat DEFAULT NULL::cds_strat, p_fund fund DEFAULT 'SERCGMAST'::fund)
RETURNS TABLE(security_id varchar(12), security_desc varchar(32), index index_type,
series smallint,
version smallint, tenor tenor, maturity date, notional float,
@@ -1156,7 +1156,7 @@ LEFT JOIN risk_num ON
END
$$ LANGUAGE plpgsql;
-CREATE OR REPLACE FUNCTION list_swaption_positions_and_risks(IN p_date date)
+CREATE OR REPLACE FUNCTION list_swaption_positions_and_risks(IN p_date date, p_fund fund DEFAULT 'SERCGMAST'::fund)
RETURNS TABLE(deal_id character varying, security_id character varying,
maturity date, notional double precision, option_type option_type,
strike double precision, expiration_date date, serenitas_nav double precision,
@@ -1190,7 +1190,7 @@ ORDER BY dealid, date DESC, periodenddate DESC;
END
$$ LANGUAGE plpgsql;
-CREATE OR REPLACE FUNCTION public.list_ir_capfloor_positions(p_date date, p_fund fund DEFAULT 'SERCGMAST'::fund)
+CREATE OR REPLACE FUNCTION list_ir_capfloor_positions(p_date date, p_fund fund DEFAULT 'SERCGMAST'::fund)
RETURNS TABLE(deal_id character varying, strategy swaption_strat, amount double precision,
cap_or_floor cap_or_floor, strike double precision, floating_rate_index character varying,
expiration_date date, initial_margin_percentage double precision,
@@ -1943,7 +1943,7 @@ LEFT JOIN external_marks_deriv on cpty_id=identifier and external_marks_deriv.da
WHERE fund='BRINKER'
ORDER BY index, series, orig_attach;
-CREATE OR REPLACE FUNCTION tranche_risk_agg(p_date date, p_fund fund)
+CREATE OR REPLACE FUNCTION tranche_risk_agg(p_date date, p_fund fund DEFAULT 'SERCGMAST'::fund)
RETURNS TABLE(date date, security_desc varchar(32), index index_type, series smallint, admin_notional float, admin_clean_nav float,
maturity date, serenitas_notional float, tranche_factor float, running float, serenitas_clean_nav float, serenitas_accrued float, initial_margin float, theta float, duration float, delta float, upfront float, index_refprice float, index_refspread float, orig_attach smallint, orig_detach smallint, index_duration float, gamma float) AS $$
DECLARE