@Test
public void testHeston() {
final MartingaleCharacteristicExponent heston = new HestonCharacteristicExponent(KAPPA, THETA, VOL0, OMEGA, RHO);
final EuropeanCallFourierTransform psi = new EuropeanCallFourierTransform(heston);
final Function1D<ComplexNumber, ComplexNumber> f = psi.getFunction(T);
ComplexNumber z = new ComplexNumber(0.0, -(1 + ALPHA));
final double mod0 = ComplexMathUtils.mod(f.evaluate(z));
double previous = 0;
for (int i = 1; i < 101; i++) {
final double x = 0.0 + 100.0 * i / 100;
z = new ComplexNumber(x, -(1 + ALPHA));
final ComplexNumber u = f.evaluate(z);
final double res = Math.log10(ComplexMathUtils.mod(u) / mod0);
assertTrue(res < previous);
previous = res;
}
}