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, 4 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 5f79cdf3..6703c8e2 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -2930,7 +2930,8 @@ SELECT swaptions.id,
expiration_date,
strike,
NOT buysell AS buysell,
- -termination_fee AS fee
+ -termination_fee AS fee,
+ deal_type
FROM terminations RIGHT JOIN swaptions USING (dealid)
LEFT JOIN counterparties ON termination_cp = code
WHERE termination_date IS NOT NULL
@@ -2952,7 +2953,8 @@ SELECT id,
expiration_date,
strike,
buysell,
- notional * price / 100 * (2* buysell::integer -1.) * COALESCE(indexfactor / 100, 1.)
+ notional * price / 100 * (2* buysell::integer -1.) * COALESCE(indexfactor / 100, 1.),
+ (CASE WHEN swap_type='CD_INDEX_OPTION' THEN 'CreditSwaption' ELSE 'IRSwaption' END)::deal_type
FROM swaptions JOIN counterparties ON cp_code = code
LEFT JOIN index_version ON security_id = redindexcode) ORDER BY trade_date DESC;