double[] aaGuess1 = new double[nParams];
final double[] aaGuess1X = new double[nParamsX];
final double[] aaGuess1Y = new double[nParamsY];
final Random objRand = new Random();
final NormalRandomNumberGenerator objRandNorm = new NormalRandomNumberGenerator(0, 5e-3);
final double[] inRelativePartialForwardsX = {1., 1. };
final double[] inRelativePartialForwardsY = {Math.exp(-0.2), (1. - Math.exp(-0.2) * 0.7) / 0.3 };
final double[] inSigmasX = {0.25, 0.7 };
final double[] inSigmasY = {0.3, 0.5 };
final double[] inWeights = {0.7, 0.3 };
final MixedLogNormalModelData inObjX = new MixedLogNormalModelData(inWeights, inSigmasX, inRelativePartialForwardsX);
final MixedLogNormalModelData inObjY = new MixedLogNormalModelData(inWeights, inSigmasY, inRelativePartialForwardsY);
final double[] xx = new double[] {0.5, 0.7, 0.9, 1.0, 1.2, 1.5, 1.8, 0.5, 0.7, 0.9, 1.0, 1.2, 1.5, 1.8 };
final MixedLogNormalVolatilityFunction volfunc = MixedLogNormalVolatilityFunction.getInstance();
Arrays.fill(yy, 0.);
for (int j = 0; j < nDataPtsX; ++j) {
final EuropeanVanillaOption option = new EuropeanVanillaOption(xx[j], time, true);
final double[] tmpRandNorm = objRandNorm.getVector(1);
yyNoRand[j] = volfunc.getVolatility(option, fwdX, inObjX);
yy[j] = yyNoRand[j] * (1. + tmpRandNorm[0]);
}
for (int j = nDataPtsX; j < nDataPts; ++j) {
final EuropeanVanillaOption option = new EuropeanVanillaOption(xx[j], time, true);
final double[] tmpRandNorm = objRandNorm.getVector(1);
yyNoRand[j] = volfunc.getVolatility(option, fwdY, inObjY);
yy[j] = yyNoRand[j] * (1. + tmpRandNorm[0]);
}
for (int j = 0; j < nDataPts; ++j) {