/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/LIBORCovarianceModelBH.java
final double rho = parameter[4]; final double s2 = timeToMaturity <= 0 ? 0 : parameter[2] * Math.exp( -parameter[3] * timeToMaturity) ;final double s1 = timeToMaturity <= 0 ? 0 : parameter[0] * Math.exp( -parameter[1] * timeToMaturity) ;
final double s1 = timeToMaturity <= 0 ? 0 : parameter[0] * Math.exp ( -parameter[1] * timeToMaturity ) ; final double s2 = timeToMaturity <= 0 ? 0 : parameter[2] * Math.exp ( -parameter[3] * timeToMaturity ) ; final double rho = parameter[4];
public double[] getParameterAsDouble() { return parameter; } @Override public RandomVariable[] getFactorLoading(final int timeIndex, final int component, final RandomVariable[] realizationAtTimeIndex) { final double timeToMaturity = getLiborPeriodDiscretization().getTime(component) - getTimeDiscretization().getTime(timeIndex); <extra_id_0> final RandomVariable[] factorLoading = new RandomVariable[2]; factorLoading[0] = new RandomVariableFromDoubleArray(getTimeDiscretization().getTime(timeIndex), Math.sqrt(1-rho*rho) * s1); factorLoading[1] = new RandomVariableFromDoubleArray(getTimeDiscretization().getTime(timeIndex), rho * s1 + s2); return factorLoading; } @Override