public static HazardCurve createHazardCurveFromSurvivalProbabilities ( String name , double [ ] times , double [ ] givenSurvivalProbabilities ) { HazardCurve survivalProbabilities = new HazardCurve ( name ) ; for ( int timeIndex = 0 ; timeIndex < times . length ; timeIndex ++ ) { survivalProbabilities . addSurvivalProbability ( times [ timeIndex ] , givenSurvivalProbabilities [ timeIndex ] , times [ timeIndex ] > 0 ) ; } return survivalProbabilities ; }
Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods .