From c34e1e0988738fe697dba5ea628203eea17c24a0 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Wed, 29 Jun 2016 15:44:42 -0400 Subject: add cdsone functions --- cdsone.pxd | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cdsone.pxd (limited to 'cdsone.pxd') diff --git a/cdsone.pxd b/cdsone.pxd new file mode 100644 index 0000000..0f76c50 --- /dev/null +++ b/cdsone.pxd @@ -0,0 +1,52 @@ +from date cimport TDateInterval +from pyisda.zerocurve cimport TCurve + +cdef extern from "isda/stub.h": + ctypedef struct TStubMethod: + pass + + int JpmcdsStringToStubMethod(char* name, TStubMethod* stub) + +cdef extern from "isda/cdsone.h": + + ctypedef int TBoolean + + ctypedef long int TDate + + int JpmcdsCdsoneUpfrontCharge(TDate today, + TDate valueDate, + TDate benchmarkStartDate, + TDate stepinDate, + TDate startDate, + TDate endDate, + double couponRate, + TBoolean payAccruedOnDefault, + TDateInterval* dateInterval, + TStubMethod* stubType, + long accrueDCC, + long badDayConv, + char* calendar, + TCurve* discCurve, + double oneSpread, + double recoveryRate, + TBoolean payAccruedAtStart, + double* upfrontCharge) + + int JpmcdsCdsoneSpread(TDate today, + TDate valueDate, + TDate benchmarkStartDate, + TDate stepinDate, + TDate startDate, + TDate endDate, + double couponRate, + TBoolean payAccruedOnDefault, + TDateInterval* dateInterval, + TStubMethod* stubType, + long accrueDCC, + long badDayConv, + char* calendar, + TCurve* discCurve, + double upfrontCharge, + double recoveryRate, + TBoolean payAccruedAtStart, + double* oneSpread) -- cgit v1.2.3-70-g09d2