public double getValueWithGivenYield ( double evaluationTime , double rate , AnalyticModel model ) { DiscountCurve referenceCurve = DiscountCurveInterpolation . createDiscountCurveFromDiscountFactors ( "referenceCurve" , new double [ ] { 0.0 , 1.0 } , new double [ ] { 1.0 , 1.0 } ) ; return getValueWithGivenSpreadOverCurve ( evaluationTime , referenceCurve , rate , model ) ; }
Returns the value of the sum of discounted cash flows of the bond where the discounting is done with the given yield curve . This method can be used for optimizer .