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