private DiscountCurve createDiscountCurve ( String discountCurveName ) { DiscountCurve discountCurve = model . getDiscountCurve ( discountCurveName ) ; if ( discountCurve == null ) { discountCurve = DiscountCurveInterpolation . createDiscountCurveFromDiscountFactors ( discountCurveName , new double [ ] { 0.0 } , new double [ ] { 1.0 } ) ; model = model . addCurves ( discountCurve ) ; } return discountCurve ; }
Get a discount curve from the model if not existing create a discount curve .