summaryrefslogtreecommitdiffstats
path: root/curve.pxd
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2016-06-30 15:02:10 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2016-06-30 15:02:47 -0400
commitf1bed268cfd976966b6bab376a59c52dfd0216fa (patch)
treed35cf7a08ec376ac0f5e53ec2aa88d12962528f2 /curve.pxd
parent6b0a14370d244d4ff3b6277c49a23b04b8957678 (diff)
downloadpyisda-f1bed268cfd976966b6bab376a59c52dfd0216fa.tar.gz
rename zerocurve to curve, and merge yearfrac with date
Diffstat (limited to 'curve.pxd')
-rw-r--r--curve.pxd33
1 files changed, 33 insertions, 0 deletions
diff --git a/curve.pxd b/curve.pxd
new file mode 100644
index 0000000..d652ca0
--- /dev/null
+++ b/curve.pxd
@@ -0,0 +1,33 @@
+cdef extern from "isda/zerocurve.h":
+
+ ctypedef long int TDate
+
+ ctypedef struct TCurve:
+ pass
+
+ ctypedef struct TDateInterval:
+ pass
+
+ TCurve* JpmcdsBuildIRZeroCurve(TDate valueDate,
+ char* instrNames,
+ TDate* dates,
+ double* rates,
+ long nInstr,
+ long mmDCC,
+ long fixedSwapFreq,
+ long floatSwapFreq,
+ long fixedSwapDCC,
+ long floatSwapDCC,
+ long badDayConv,
+ char* holidayFile)
+
+cdef extern from "isda/tcurve.h":
+ void JpmcdsFreeTCurve(TCurve* curve)
+
+cdef extern from "isda/cxzerocurve.h":
+ double JpmcdsZeroPrice(TCurve* curve, TDate date)
+
+cdef class ZeroCurve:
+ cdef TCurve* _thisptr
+ cdef TDate* _dates
+ cdef size_t _ninstr