summaryrefslogtreecommitdiffstats
path: root/c_layer/cdsbootstrap.h
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2016-11-10 14:21:34 -0500
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2016-11-10 14:21:34 -0500
commit8134b12f3d051e468a20df1a8e90408dedc3d112 (patch)
tree914139595dd6c822023fb23da42ce1df6f34a0df /c_layer/cdsbootstrap.h
parentf39919c51ec7e4dab767156db0ed1fd457787672 (diff)
downloadpyisda-8134b12f3d051e468a20df1a8e90408dedc3d112.tar.gz
add fater version
Diffstat (limited to 'c_layer/cdsbootstrap.h')
-rw-r--r--c_layer/cdsbootstrap.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/c_layer/cdsbootstrap.h b/c_layer/cdsbootstrap.h
new file mode 100644
index 0000000..2e19189
--- /dev/null
+++ b/c_layer/cdsbootstrap.h
@@ -0,0 +1,26 @@
+#include "isda/ldate.h"
+#include "isda/cxzerocurve.h"
+#include "isda/feeleg.h"
+#include "isda/contingentleg.h"
+#include "stdio.h"
+
+
+#define SUCCESS 0
+#define FAILURE -1
+
+typedef struct
+{
+ TDate stepinDate;
+ TDate cashSettleDate;
+ TCurve *discountCurve;
+ TCurve *cdsCurve;
+ double recoveryRate;
+ double spread;
+ TContingentLeg *cl;
+ TFeeLeg *fl;
+} cds_bootstrap_ctx;
+
+
+int cdsBootstrapPointFunction(double hazardRate,
+ void *data,
+ double *pv);