summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyisda/curve.pyx6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index 6ceee57..f33db25 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -183,11 +183,13 @@ cdef class SpreadCurve(Curve):
cdef TDate* end_dates_c = <TDate*>malloc(len(end_dates) * sizeof(TDate))
self._thisptr = NULL
cdef size_t i
-
+ if cash_settle_date < yc.inspect()['base_date']:
+ raise ValueError("cash_settle_date: {0} is anterior to yc's base_date: {1}".
+ format(cash_settle_date, yc.inspect()['base_date']))
for i, d in enumerate(end_dates):
end_dates_c[i] = pydate_to_TDate(d)
- cdef TStubMethod stub_type
+ cdef TStubMethod stub_type
if JpmcdsStringToStubMethod(b"f/s", &stub_type) != 0:
raise ValueError("can't convert stub")