QL.info("Today: " + today);
final SimpleQuote spot = new SimpleQuote(100.0);
final SimpleQuote qRate = new SimpleQuote(0.03);
final YieldTermStructure qTS = Utilities.flatRate(today, qRate.value(), dc);
final SimpleQuote rRate = new SimpleQuote(0.06);
final YieldTermStructure rTS = Utilities.flatRate(today, rRate.value(), dc);
final SimpleQuote vol = new SimpleQuote(0.20);
final BlackVolTermStructure volTS = Utilities.flatVol(today, vol.value(), dc);
final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot),
new Handle<YieldTermStructure>(qTS), new Handle<YieldTermStructure>(rTS), new Handle<BlackVolTermStructure>(volTS));
final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(stochProcess);
final AverageType averageType = AverageType.Geometric;
/* @Real */final double runningAccumulator = 1.0;
/* @Size */final int pastFixings = 0;
/* @Size */final int futureFixings = 10;
final Option.Type type = Option.Type.Call;
/* @Real */final double strike = 100.0;
final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);
final Date exerciseDate = today.clone().addAssign(360);
final Exercise exercise = new EuropeanExercise(exerciseDate);
QL.info("Exercise: " + exerciseDate);
QL.info("Df: " + rTS.discount(exerciseDate));
QL.info("DivDf: " + qTS.discount(exerciseDate));
final List<Date> fixingDates = new ArrayList<Date>(futureFixings);
final int dt = (int) (360.0 / (futureFixings) + 0.5);
fixingDates.add(today.clone().addAssign(dt));