diff options
Diffstat (limited to 'c_layer')
| -rw-r--r-- | c_layer/cdsbootstrap.c | 13 | ||||
| -rw-r--r-- | c_layer/cdsbootstrap.h | 5 |
2 files changed, 4 insertions, 14 deletions
diff --git a/c_layer/cdsbootstrap.c b/c_layer/cdsbootstrap.c index f3ae975..6b0a4cd 100644 --- a/c_layer/cdsbootstrap.c +++ b/c_layer/cdsbootstrap.c @@ -1,12 +1,6 @@ #include "cdsbootstrap.h" -int cdsBootstrapPointFunction -(double hazardRate, - void *data, - double *pv) -{ - int status = FAILURE; - +double cdsBootstrapPointFunction(double hazardRate, void *data) { cds_bootstrap_ctx *context = (cds_bootstrap_ctx*)data; TCurve *discountCurve = context->discountCurve; @@ -27,7 +21,6 @@ int cdsBootstrapPointFunction cdsCurve, context->recoveryRate, &pvC) != SUCCESS) - goto done; if (JpmcdsFeeLegPV(context->fl, cdsBaseDate, @@ -37,10 +30,8 @@ int cdsBootstrapPointFunction cdsCurve, 1, &pvF) != SUCCESS) - goto done; /* Note: price is discounted to cdsBaseDate */ - *pv = pvC - context->spread * pvF; - status = SUCCESS; + return pvC - context->spread * pvF; done: diff --git a/c_layer/cdsbootstrap.h b/c_layer/cdsbootstrap.h index 2e19189..5a50962 100644 --- a/c_layer/cdsbootstrap.h +++ b/c_layer/cdsbootstrap.h @@ -21,6 +21,5 @@ typedef struct } cds_bootstrap_ctx; -int cdsBootstrapPointFunction(double hazardRate, - void *data, - double *pv); +double cdsBootstrapPointFunction(double hazardRate, + void *data); |
