public static DiscountCurve createDiscountCurveFromDiscountFactors ( String name , double [ ] times , double [ ] givenDiscountFactors ) { DiscountCurve discountFactors = new DiscountCurve ( name ) ; for ( int timeIndex = 0 ; timeIndex < times . length ; timeIndex ++ ) { discountFactors . addDiscountFactor ( times [ timeIndex ] , givenDiscountFactors [ timeIndex ] , times [ timeIndex ] > 0 ) ; } return discountFactors ; }
Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods .