double[] mu = new double[] {0.0, 0.3, -0.5 };
MultiHorizonMixedLogNormalModelData data = new MultiHorizonMixedLogNormalModelData(w, sigma, mu);
BlackVolatilitySurfaceStrike ivs = MixedLogNormalVolatilitySurface.getImpliedVolatilitySurface(fc, data);
PDEUtilityTools.printSurface("imp vol", ivs.getSurface(), 0.01, 2.0, spot * 0.1, spot * 3.0);
LocalVolatilitySurfaceStrike lvs = MixedLogNormalVolatilitySurface.getLocalVolatilitySurface(fc, data);
PDEUtilityTools.printSurface("local vol", lvs.getSurface(), 0.00, 2.0, spot * 0.1, spot * 3.0);
DupireLocalVolatilityCalculator cal = new DupireLocalVolatilityCalculator();
LocalVolatilitySurfaceStrike lv2 = cal.getLocalVolatility(ivs, fc);
// PDEUtilityTools.printSurface("local vo2l", lv2.getSurface(), 0.01, 2.0, spot * 0.3, spot * 3.0);
System.out.println("lv: " + lvs.getVolatility(2.0, 1.7 * spot));
System.out.println("lv2: " + lv2.getVolatility(2.0, 1.7 * spot));
EquityVarianceSwapStaticReplication vsPricer = new EquityVarianceSwapStaticReplication();
double[] res = vsPricer.expectedVariance(spot, discountCurve, AffineDividends.noDividends(), t, ivs);
System.out.println(Math.sqrt(res[0] / t));