diff options
| -rw-r--r-- | pyisda/credit_index.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx index a3c6fe9..6526c8e 100644 --- a/pyisda/credit_index.pyx +++ b/pyisda/credit_index.pyx @@ -733,7 +733,7 @@ cdef double pv(const vector[shared_ptr[TCurve]]& curves, double epsilon, unsigned long mask) nogil: cdef: - double fl_pv, cl_pv, r = 0 + double fl_pv, cl_pv, r = 0.0 TCurve *tweaked_curve TCurve *orig_curve size_t i = 0 @@ -743,7 +743,6 @@ cdef double pv(const vector[shared_ptr[TCurve]]& curves, with parallel(): fl_pv = 0. cl_pv = 0. - for i in prange(curves.size()): tweaked_curve = curves[i].get() recovery_rate = recovery_rates[i].get() @@ -775,6 +774,7 @@ cdef double pv(const vector[shared_ptr[TCurve]]& curves, fl_pv = 0. for i in prange(curves.size()): orig_curve = curves[i].get() + tweaked_curve.fBaseDate = orig_curve.fBaseDate tweak_curve(orig_curve, tweaked_curve, epsilon, mask) recovery_rate = recovery_rates[i].get() # FIXME: do something better |
