summaryrefslogtreecommitdiffstats
path: root/curve.pxd
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2016-06-30 15:03:44 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2016-06-30 15:03:44 -0400
commited83c435dcb32b5afd7f58a0fde72b41dc0d09e6 (patch)
tree8d452dff2ac51a02eea4df3960b61d7f45f3e8d6 /curve.pxd
parentf1bed268cfd976966b6bab376a59c52dfd0216fa (diff)
downloadpyisda-ed83c435dcb32b5afd7f58a0fde72b41dc0d09e6.tar.gz
legs functions
Diffstat (limited to 'curve.pxd')
-rw-r--r--curve.pxd52
1 files changed, 51 insertions, 1 deletions
diff --git a/curve.pxd b/curve.pxd
index d652ca0..b365b5a 100644
--- a/curve.pxd
+++ b/curve.pxd
@@ -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