Package org.jquantlib.pricingengines

Examples of org.jquantlib.pricingengines.PricingEngine$Arguments


        // obtain stochastic process
        this.stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);

        // obtain a pricing engine and assign to this option :: 3 intervals a day
        final int timeSteps = (int) (exercise.lastDate().sub(referenceDate) * 3);
        final PricingEngine engine = new BinomialDividendVanillaEngine<CoxRossRubinstein>(CoxRossRubinstein.class, stochProcess, timeSteps) { /* anonymous */ };

        // assign the pricing engine to this option
        this.setPricingEngine(engine);

        // assign new values to spot, qRate, rRate and vol
View Full Code Here


            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 BjerksundStenslandApproximationEngine(stochProcess);

            final VanillaOption option = new VanillaOption(payoff, exercise);
            option.setPricingEngine(engine);

            final double /* @Real */calculated = option.NPV();
View Full Code Here

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

            final PricingEngine engine = new BaroneAdesiWhaleyApproximationEngine(stochProcess);

            final VanillaOption option = new VanillaOption(payoff, exercise);
            option.setPricingEngine(engine);

            final double /* @Real */calculated = option.NPV();
View Full Code Here

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

            final PricingEngine engine = new JuQuadraticApproximationEngine(stochProcess);

            final VanillaOption option = new VanillaOption(payoff, exercise);
            option.setPricingEngine(engine);

            final double calculated = option.NPV();
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

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

                    PricingEngine engine = null;
                    try {
                        final Constructor<? extends PricingEngine> c = klass.getConstructor(GeneralizedBlackScholesProcess.class);
                        engine = c.newInstance(stochProcess);
                    } catch (final Exception e) {
                        e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.jquantlib.pricingengines.PricingEngine$Arguments

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.