Package org.jquantlib.pricingengines.asian

Examples of org.jquantlib.pricingengines.asian.AnalyticDiscreteGeometricAveragePriceAsianEngine


        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;
View Full Code Here


                    d.addAssign(new Period(3, TimeUnit.Months));
                    for (d.addAssign(THREEMONTH); d.le(maturity.lastDate()); d.addAssign(THREEMONTH)) {
                        fixingDates.add(d.clone());
                    }

                    final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(process);

                    final DiscreteAveragingAsianOption option = new DiscreteAveragingAsianOption(
                            AverageType.Geometric, runningAverage, pastFixings, fixingDates, payoff, maturity);
                    option.setPricingEngine(engine);
View Full Code Here

        for (/* @Size */int i = 0; i < 91; i++) {
            fixingDates.add(today.clone().addAssign(i));
        }

        final PricingEngine engine2 = new AnalyticDiscreteGeometricAveragePriceAsianEngine(stochProcess);
        final DiscreteAveragingAsianOption option2 = new DiscreteAveragingAsianOption(
                averageType, runningAccumulator, pastFixings, fixingDates, payoff, exercise);
        option2.setPricingEngine(engine2);

        calculated = option2.NPV();
View Full Code Here

TOP

Related Classes of org.jquantlib.pricingengines.asian.AnalyticDiscreteGeometricAveragePriceAsianEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.