/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormal.java
double vol = Math.abs( volSquaredEstimate) / szenarioRelativeChange;
double vol = Math.sqrt ( volSquaredEstimate ) / volScaling;
double volSquaredEstimate = 0.0; for (int i = windowIndexStart+1; i <= windowIndexEnd-1; i++) { final double eval = volScaling * (Math.log((values[i]+displacement)/(values[i-1]+displacement))); volSquaredEstimate += eval*eval; } volSquaredEstimate /= windowIndexEnd-windowIndexStart; <extra_id_0> for (int i = windowIndexStart+1; i <= windowIndexEnd; i++) { final double y = Math.log((values[i]+displacement)/(values[i-1]+displacement)); szenarios[i-windowIndexStart-1] = y / vol; final double eval = volScaling * y; vol = Math.sqrt(volSquaredEstimate) / volScaling; }