code: 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;
  	}
docs: Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.
  
  @param name The name of this hazard curve.
  @param times Array of times as doubles.
  @param givenSurvivalProbabilities Array of corresponding survival probabilities.
  @return A new discount factor object.