diff options
Diffstat (limited to 'c_layer/cdsbootstrap.c')
| -rw-r--r-- | c_layer/cdsbootstrap.c | 13 |
1 files changed, 2 insertions, 11 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: |
