Package org.jquantlib.instruments

Examples of org.jquantlib.instruments.BarrierOption$EngineImpl


                    new Handle<YieldTermStructure>(qTS),
                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));
            final PricingEngine engine = new AnalyticBarrierEngine(stochProcess);

            final BarrierOption barrierOption = new BarrierOption(value.barrierType, value.barrier, value.rebate, payoff, exercise);
            barrierOption.setPricingEngine(engine);

            final double calculated = barrierOption.NPV();
            final double expected = value.result;
            final double error = Math.abs(calculated-expected);
            if (error>value.tol) {
                REPORT_FAILURE("value", value.barrierType, value.barrier,
                        value.rebate, payoff, exercise, value.s,
View Full Code Here


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

            final PricingEngine engine = new AnalyticBarrierEngine(stochProcess);

            final BarrierOption barrierCallOption = new BarrierOption(value.barrierType, value.barrier, rebate, callPayoff, exercise);
            barrierCallOption.setPricingEngine(engine);

            final double calculated = barrierCallOption.NPV();
            final double expected = value.callValue;
            final double error = Math.abs(calculated - expected);
            final double maxErrorAllowed = 1.0e-3;

            if (error > maxErrorAllowed) {
View Full Code Here

                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));
            final PricingEngine engine = new AnalyticBarrierEngine(stochProcess);


            final BarrierOption barrierCallOption = new BarrierOption(value.barrierType, value.barrier, rebate, callPayoff, exercise);
            barrierCallOption.setPricingEngine(engine);

            final double calculated = barrierCallOption.NPV();
            final double expected = value.callValue;
            final double error = Math.abs(calculated - expected);
            final double maxErrorAllowed = 1.0e-3;

            if (error > maxErrorAllowed) {
View Full Code Here

TOP

Related Classes of org.jquantlib.instruments.BarrierOption$EngineImpl

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.