diff options
Diffstat (limited to 'curve.pxd')
| -rw-r--r-- | curve.pxd | 52 |
1 files changed, 51 insertions, 1 deletions
@@ -1,4 +1,7 @@ +from cdsone cimport TStubMethod + cdef extern from "isda/zerocurve.h": + ctypedef int TBoolean ctypedef long int TDate @@ -20,6 +23,48 @@ cdef extern from "isda/zerocurve.h": long floatSwapDCC, long badDayConv, char* holidayFile) +cdef extern from "isda/cds.h": + + TCurve* JpmcdsCleanSpreadCurve( + # Risk starts at the end of today + TDate today, + # Interest rate discount curve - assumes flat forward interpolation + TCurve *discCurve, + # Effective date of the benchmark CDS + TDate startDate, + # Step in date of the benchmark CDS + TDate stepinDate, + # Date when payment should be make + TDate cashSettleDate, + # Number of benchmark dates + long nbDate, + # Dates when protection ends for each benchmark (end of day). + # Array of size nbDate + TDate *endDates, + # Coupon rates for each benchmark instrument. Array of size nbDate + double *couponRates, + # Flags to denote that we include particular benchmarks. This makes it + # easy for the user to include or exclude benchmarks on a one-by-one + # basis. Can be NULL if all are included. Otherwise an array of size + # nbDate. + TBoolean *includes, + # Recovery rate in case of default + double recoveryRate, + # Should accrued interest be paid on default. Usually set to TRUE + TBoolean payAccOnDefault, + # Interval between coupon payments. Can be NULL when 3M is assumed + TDateInterval *couponInterval, + # Day count convention for coupon payment. Normal is ACT_360 + long paymentDcc, + # If the startDate and endDate are not on cycle, then this parameter + # determines location of coupon dates. */ + TStubMethod *stubType, + # Bad day convention for adjusting coupon payment dates. */ + long badDayConv, + # Calendar used when adjusting coupon dates. Can be NULL which equals + # a calendar with no holidays and including weekends. */ + char *calendar + ) cdef extern from "isda/tcurve.h": void JpmcdsFreeTCurve(TCurve* curve) @@ -27,7 +72,12 @@ cdef extern from "isda/tcurve.h": cdef extern from "isda/cxzerocurve.h": double JpmcdsZeroPrice(TCurve* curve, TDate date) -cdef class ZeroCurve: +cdef class Curve: cdef TCurve* _thisptr + +cdef class ZeroCurve(Curve): cdef TDate* _dates cdef size_t _ninstr + +cdef class SpreadCurve(Curve): + pass |
