protected double Compute_Coupons_PV(DateTime valuationDate, myRateCurve rateCurve) { double cumSum = 0.0; foreach (DateTime dt in coupons_Schedule(valuationDate).Keys) { _couponDF[dt] = 0.01 * rateCurve.getDiscountFactor(dt); _couponPV[dt] = _couponDF[dt] * _couponSchedule[dt]; cumSum += _couponPV[dt]; } return(cumSum); }
protected double Compute_PV(DateTime valuationDate, Period curvePeriod, myRateCurve rateCurve) { _valuationDate = valuationDate; double cumSum = 0.0; foreach (DateTime dt in _couponSchedule.Keys) { _DF[dt] = 0.01 * rateCurve.getDiscountFactor(dt); _PV[dt] = _DF[dt] * _couponSchedule[dt]; cumSum += _PV[dt]; } return(cumSum); }