Added legacy code as comment, default set to LINEAR interpol
@@ -170,7 +170,7 @@ public class LIBORMarketModelFromCovarianceModel extends AbstractProcessModel im
private Driftapproximation driftApproximationMethod = Driftapproximation.EULER;
private Measure measure = Measure.SPOT;
private StateSpace stateSpace = StateSpace.LOGNORMAL;
- private InterpolationMethod interpolationMethod = InterpolationMethod.LOG_LINEAR_UNCORRECTED;
+ private InterpolationMethod interpolationMethod = InterpolationMethod.LINEAR;//.LOG_LINEAR_UNCORRECTED;
private double liborCap = 1E5;
// This is a cache of the integrated covariance.
@@ -1229,7 +1229,8 @@ public class LIBORMarketModelFromCovarianceModel extends AbstractProcessModel im
double nextStartTime = getLiborPeriod(previousStartIndex+1);
if(nextStartTime > periodEnd) throw new AssertionError("Interpolation not possible.");
if(nextStartTime == periodEnd) return getOnePlusInterpolatedLIBORDt(timeIndex, periodStart, previousStartIndex).sub(1.0).div(periodEnd - periodStart);
- RandomVariable onePlusLongLIBORdt = getLIBOR(Math.min(prevStartTime, time), nextStartTime, periodEnd).mult(periodEnd - nextStartTime).add(1.0);
+// RandomVariable onePlusLongLIBORdt = getLIBOR(Math.min(prevStartTime, time), nextStartTime, periodEnd).mult(periodEnd - nextStartTime).add(1.0);
+ RandomVariable onePlusLongLIBORdt = getLIBOR(time, nextStartTime, periodEnd).mult(periodEnd - nextStartTime).add(1.0);
RandomVariable onePlusInterpolatedLIBORDt = getOnePlusInterpolatedLIBORDt(timeIndex, periodStart, previousStartIndex);
return onePlusLongLIBORdt.mult(onePlusInterpolatedLIBORDt).sub(1.0).div(periodEnd - periodStart);
}
