aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/models.py')
-rw-r--r--python/Dawn/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index 7e556f15..ab5a6fb7 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -37,7 +37,7 @@ BOND_STRAT = ENUM('M_STR_MAV', 'M_STR_MEZZ', 'CSO_TRANCH',
CDS_STRAT = ENUM('HEDGE_CSO', 'HEDGE_CLO', 'HEDGE_MAC', 'HEDGE_MBS',
'SER_IGSNR', 'SER_IGMEZ', 'SER_IGEQY', 'SER_IGINX', 'SER_HYSNR',
'SER_HYMEZ', 'SER_HYEQY', 'SER_HYINX', 'SER_IGCURVE', 'MBSCDS',
- 'IGOPTDEL', 'HYOPTDEL', name='cds_strat')
+ 'IGOPTDEL', 'HYOPTDEL', 'SER_ITRXCURVE', name='cds_strat')
SWAPTION_STRAT = ENUM('IGPAYER', 'IGREC', 'HYPAYER', 'HYREC',
name='swaption_strat')
@@ -129,6 +129,7 @@ class CDSDeal(db.Model):
security_desc = db.Column(db.String(32), nullable = False)
upfront = db.Column(db.Float, nullable = False)
upfront_settle_date = db.Column(db.Date, nullable = False)
+ initial_margin_percentage = db.Column(db.Float)
swap_type = db.Column(SWAP_TYPE, nullable = False)
attach = db.Column(db.SmallInteger, info={'min': 0, 'max':100})
detach = db.Column(db.SmallInteger, info={'min': 0, 'max':100})
@@ -136,7 +137,8 @@ class CDSDeal(db.Model):
isda_definition = db.Column(ISDA)
counterparty = db.relationship(Counterparties)
__table_args__ = (db.CheckConstraint("swap_type!='CD_INDEX_TRANCHE' or " \
- "(attach is not NULL and detach is not NULL)"),)
+ "(attach is not NULL and detach is not NULL AND " \
+ "clearing_facility is NULL)"),)
class RepoDeal(db.Model):
__tablename__ = 'repo'