aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics')
-rw-r--r--python/analytics/tranche_basket.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py
index 8820e83a..b75559ab 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -596,6 +596,9 @@ class DualCorrTranche:
)
def theta(self, method="ATM", skew=None):
+ if self.maturity + relativedelta(years=-1) < self.value_date:
+ raise ValueError("less than one year left")
+
def aux(x, K2, shortened):
if x == 0.0 or x == 1.0:
newrho = x