/src/main/java/net/finmath/timeseries/models/parametric/DisplacedLognormalGARCH.java
final - double szenarioRelativeChange =( quantileIndexHi-quantileIndex) * Math.exp( szenarios[Math.max( quantileIndexLo,0        ) ] * vol) + ( quantileIndex-quantileIndexLo) * Math.exp( szenarios[Math.min( quantileIndexHi,szenarios.length) ] * vol) ;
final double szenarioRelativeChange = ( quantileIndexHi-quantileIndex ) * Math.exp ( szenarios[Math.max ( quantileIndexLo,0    ) ] * vol ) + ( quantileIndex-quantileIndexLo ) * Math.exp ( szenarios[Math.min ( quantileIndexHi,szenarios.length ) ] * vol ) ;
final double[] quantileValues = new double[quantiles.length]; for(int i=0; i<quantiles.length; i++) { final double quantile = quantiles[i]; final double quantileIndex = szenarios.length * quantile - 1; final int quantileIndexLo = (int)quantileIndex; final int quantileIndexHi = quantileIndexLo+1; <extra_id_0> double szenarioRelativeChange = (quantileIndexHi-quantileIndex) * (1 + szenarios[Math.max(quantileIndexLo,0 )] * vol) + (quantileIndex-quantileIndexLo) * (1 + szenarios[Math.min(quantileIndexHi,szenarios.length)] * vol); final double quantileValue = (values[windowIndexEnd]+displacement) * szenarioRelativeChange - displacement; quantileValues[i] = quantileValue; }