Examples of FDAmericanEngine


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

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

        // 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

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

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

                    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
Copyright © 2018 www.massapi.com. 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.