docs: public RandomVariable[] getBasisFunctions(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
  
  		LocalDateTime modelReferenceDate = model.getReferenceDate();
  
  		double[] regressionBasisfunctionTimes = Stream.concat(Arrays.stream(exerciseDates),Stream.of(swapEndDate)).mapToDouble(new ToDoubleFunction<LocalDate>() {
  			@Override
  			public double applyAsDouble(LocalDate date) { return FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, date.atStartOfDay()); }
  		}).sorted().toArray();
  
  		ArrayList<RandomVariable> basisFunctions = new ArrayList<>();
  
  		double exerciseTime = evaluationTime;
  
  		int exerciseIndex = Arrays.binarySearch(regressionBasisfunctionTimes, exerciseTime);
  		if(exerciseIndex < 0) {
  			exerciseIndex = -exerciseIndex;
  		}
  		if(exerciseIndex >= exerciseDates.length) {
  			exerciseIndex = exerciseDates.length-1;
  		}
  
  		// Constant
  		RandomVariable one = new RandomVariableFromDoubleArray(1.0);
  		basisFunctions.add(one);
  
  		// Numeraire (adapted to multicurve framework)
  		RandomVariable discountFactor = model.getNumeraire(exerciseTime).invert();
  		basisFunctions.add(discountFactor);
  
  		/*
  		 * Add swap rates of underlyings.
  		 */
  		for(int exerciseIndexUnderlying = exerciseIndex; exerciseIndexUnderlying<exerciseDates.length; exerciseIndexUnderlying++) {
  			RandomVariable floatLeg = SwaptionFromSwapSchedules.getValueOfLegAnalytic(exerciseTime, model, floatSchedules[exerciseIndexUnderlying], true, 0.0, 1.0);
  			RandomVariable annuity = SwaptionFromSwapSchedules.getValueOfLegAnalytic(exerciseTime, model, fixSchedules[exerciseIndexUnderlying], false, 1.0, 1.0);
  			RandomVariable swapRate = floatLeg.div(annuity);
  			RandomVariable basisFunction = swapRate.mult(discountFactor);
  			basisFunctions.add(basisFunction);
  			basisFunctions.add(basisFunction.squared());
  		}
  
  		// forward rate to the next period
  		RandomVariable rateShort = model.getLIBOR(exerciseTime, exerciseTime, regressionBasisfunctionTimes[exerciseIndex + 1]);
  		basisFunctions.add(rateShort.mult(discountFactor));
  		basisFunctions.add(rateShort.mult(discountFactor).pow(2.0));
  
  		return basisFunctions.toArray(new RandomVariable[basisFunctions.size()]);
  	}