Package org.jquantlib.pricingengines.vanilla.finitedifferences

Examples of org.jquantlib.pricingengines.vanilla.finitedifferences.FDAmericanEngine


        switch (exercise.type()) {
          case European:
            engine = new AnalyticEuropeanEngine(newProcess);
            break;
          case American:
            engine = new FDAmericanEngine(newProcess);
            break;
          case Bermudan:
            engine = new FDBermudanEngine(newProcess);
            break;
          default:
View Full Code Here


        // Finite differences
        method = "Finite differences";
        europeanOption.setPricingEngine(new FDEuropeanEngine(bsmProcess, timeSteps, timeSteps-1, false));
        bermudanOption.setPricingEngine(new FDBermudanEngine(bsmProcess, timeSteps, timeSteps-1));
        americanOption.setPricingEngine(new FDAmericanEngine(bsmProcess, timeSteps, timeSteps-1, false));
        if (System.getProperty("EXPERIMENTAL") != null) {
            bNPV = bermudanOption.NPV();
        }
        System.out.printf(fmt, method, europeanOption.NPV(), bNPV, americanOption.NPV() );
View Full Code Here

        switch (exercise.type()) {
          case European:
            engine = new AnalyticEuropeanEngine(newProcess);
            break;
          case American:
            engine = new FDAmericanEngine(newProcess);
            break;
          case Bermudan:
            engine = new FDBermudanEngine(newProcess);
            break;
          default:
View Full Code Here

                    new Handle<Quote>(spot),
                    new Handle<YieldTermStructure>(qTS),
                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));

            final PricingEngine engine = new FDAmericanEngine(stochProcess, 100, 100);
            final VanillaOption option = new VanillaOption(payoff, exercise);
            option.setPricingEngine(engine);

            final double calculated = option.NPV();
            final double error = Math.abs(calculated - juValue.result);
View Full Code Here

TOP

Related Classes of org.jquantlib.pricingengines.vanilla.finitedifferences.FDAmericanEngine

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.