aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/Dawn/models.py1
-rw-r--r--python/Dawn/static/dawn.js2
-rw-r--r--sql/dawn.sql3
3 files changed, 6 insertions, 0 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index d71a520e..d11a6394 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -241,6 +241,7 @@ class SwaptionDeal(db.Model):
fixed_rate = db.Column(db.Float)
maturity = db.Column(db.Date, nullable=False)
currency = db.Column(CCY, nullable=False)
+ settlement_type = db.Column(SETTLEMENT_TYPE, nullable=False)
termination_date = db.Column(db.Date)
termination_amount = db.Column(db.Float)
termination_cp = db.Column(db.String(12), db.ForeignKey('counterparties.code'),
diff --git a/python/Dawn/static/dawn.js b/python/Dawn/static/dawn.js
index 57788ce1..8ff78574 100644
--- a/python/Dawn/static/dawn.js
+++ b/python/Dawn/static/dawn.js
@@ -60,12 +60,14 @@ $(function() {
$('#index_ref').parent().parent().css('display', 'none');
$('#security_desc').parent().parent().css('display', 'none');
$('#portfolio').val('IR');
+ $('#settlement_type').val('Cash');
break;
case 'CD_INDEX_OPTION':
$('#fixed_rate').parent().parent().css('display', 'block');
$('#index_ref').parent().parent().css('display', 'block');
$('#security_desc').parent().parent().css('display', 'block');
$('#portfolio').val('OPTIONS');
+ $('#settlement_type').val('Delivery');
break;
}
});
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 4fcf451b..8f142814 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -45,6 +45,8 @@ CREATE TYPE protection AS ENUM('Buyer', 'Seller');
CREATE TYPE call_notice AS ENUM('24H', '48H', '3D', '4D', '5D', '6D',
'1W', '8D', '9D', '10D', '2W', '1M', '2M');
+CREATE TYPE settlement_type AS ENUM('Delivery', 'Cash');
+
CREATE TABLE accounts(
code varchar(5) PRIMARY KEY,
name text,
@@ -206,6 +208,7 @@ CREATE TABLE swaptions(id serial PRIMARY KEY,
security_desc varchar(32),
maturity date NOT NULL,
currency currency NOT NULL,
+ settlement_type settlement_type NOT NULL,
fixed_rate float,
termination_date date,
termination_amount float,