diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-07-01 16:08:17 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-07-01 16:08:17 -0400 |
| commit | 104303510b747ffa31b96e44465eb5fdbd016304 (patch) | |
| tree | 89fc56cb1faca2a3e3e6c4424dd7104f4d24908c /legs.pyx | |
| parent | ed83c435dcb32b5afd7f58a0fde72b41dc0d09e6 (diff) | |
| download | pyisda-104303510b747ffa31b96e44465eb5fdbd016304.tar.gz | |
more progress
Diffstat (limited to 'legs.pyx')
| -rw-r--r-- | legs.pyx | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -14,6 +14,9 @@ cdef class ContingentLeg: pydate_to_TDate(end_date), notional, protect_start) + if self._thisptr is NULL: + raise ValueError + def __dealloc__(self): if self._thisptr is not NULL: free(self._thisptr) @@ -38,14 +41,17 @@ cdef class FeeLeg: coupon_rate, dcc(payment_dcc), <long>'M', - NULL, + b'NONE', protect_start) + if self._thisptr is NULL: + raise ValueError + @property def cashflows(self): cdef TCashFlowList* cfl = JpmcdsFeeLegFlows(self._thisptr) cdef TCashFlow cf result = [] - for i in range(cf.fNumItems): + for i in range(cfl.fNumItems): cf = cfl.fArray[i] result.append((TDate_to_pydate(cf.fDate), cf.fAmount)) return result |
