Examples of delta()


Examples of org.jquantlib.instruments.DividendVanillaOption.delta()

                                if (value > spot.value()*1.0e-5) {
                                    // perturb spot and get delta and gamma
                                    /* @Real */ final double du = u*1.0e-4;
                                    spot.setValue(u+du);
                                    /* @Real */ double value_p = option.NPV();
                                    final double delta_p = option.delta();
                                    spot.setValue(u-du);
                                    /* @Real */ double value_m = option.NPV();
                                    final double delta_m = option.delta();
                                    spot.setValue(u);
                                    expected.put("delta", (value_p - value_m)/(2*du) );
View Full Code Here

Examples of org.jquantlib.instruments.DividendVanillaOption.delta()

                                    spot.setValue(u+du);
                                    /* @Real */ double value_p = option.NPV();
                                    final double delta_p = option.delta();
                                    spot.setValue(u-du);
                                    /* @Real */ double value_m = option.NPV();
                                    final double delta_m = option.delta();
                                    spot.setValue(u);
                                    expected.put("delta", (value_p - value_m)/(2*du) );
                                    expected.put("gamma", (delta_p - delta_m)/(2*du) );

                                    // perturb risk-free /* @Rate */ double and get rho
View Full Code Here

Examples of org.jquantlib.instruments.DividendVanillaOption.delta()

                                rRate.setValue(r);
                                vol.setValue(v);

                                // FLOATING_POINT_EXCEPTION
                                /* @Real */ final double value = option.NPV();
                                calculated.put("delta", option.delta() );
                                calculated.put("gamma", option.gamma() );
                                // calculated.put("theta", option.theta() );

                                if (value > spot.value()*1.0e-5) {
                                  // perturb spot and get delta and gamma
View Full Code Here

Examples of org.jquantlib.instruments.DividendVanillaOption.delta()

                                if (value > spot.value()*1.0e-5) {
                                  // perturb spot and get delta and gamma
                                  /* @Real */ final double du = u*1.0e-4;
                                  spot.setValue(u+du);
                                  /* @Real */ final double value_p = option.NPV(),
                                       delta_p = option.delta();
                                  spot.setValue(u-du);
                                  /* @Real */ final double value_m = option.NPV(),
                                       delta_m = option.delta();
                                  spot.setValue(u);
                                  expected.put("delta", (value_p - value_m)/(2*du) );
View Full Code Here

Examples of org.jquantlib.instruments.DividendVanillaOption.delta()

                                  spot.setValue(u+du);
                                  /* @Real */ final double value_p = option.NPV(),
                                       delta_p = option.delta();
                                  spot.setValue(u-du);
                                  /* @Real */ final double value_m = option.NPV(),
                                       delta_m = option.delta();
                                  spot.setValue(u);
                                  expected.put("delta", (value_p - value_m)/(2*du) );
                                  expected.put("gamma", (delta_p - delta_m)/(2*du) );

                                  // perturb date and get theta
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.delta()

        final PricingEngine engine = new AnalyticEuropeanEngine(stochProcess);

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

        calculated = option.delta();
        error = Math.abs(calculated - values[i].result);

        if (error > tolerance) {
            REPORT_FAILURE("delta", payoff, exercise, values[i].s, values[i].q, values[i].r, today, values[i].v,
                    values[i].result, calculated, error, tolerance);
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.delta()

        vol.setValue(values[i].v);

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

        calculated = option.delta();
        error = Math.abs(calculated - values[i].result);
        if(error>tolerance) {
            REPORT_FAILURE("delta", payoff, exercise, values[i].s, values[i].q, values[i].r, today, values[i].v,
                    values[i].result, calculated, error, tolerance);
        }
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.delta()

                                        qRate.setValue(q);
                                        rRate.setValue(r);
                                        vol.setValue(v);

                                        final double value = option.NPV();
                                        final double delta = option.delta();
                                        final double gamma = option.gamma();
                                        final double theta = option.theta();
                                        final double rho   = option.rho();
                                        final double drho  = option.dividendRho();
                                        final double vega  = option.vega();
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.delta()

                                        if (value > spot.value()*1.0e-5) {
                                            // perturb spot and get delta and gamma
                                            final double du = u*1.0e-4;
                                            spot.setValue(u+du);
                                            double value_p = option.NPV();
                                            final double delta_p = option.delta();
                                            spot.setValue(u-du);

                                            double value_m = option.NPV();
                                            final double delta_m = option.delta();
                                            spot.setValue(u);
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.delta()

                                            double value_p = option.NPV();
                                            final double delta_p = option.delta();
                                            spot.setValue(u-du);

                                            double value_m = option.NPV();
                                            final double delta_m = option.delta();
                                            spot.setValue(u);
                                            expected.put("delta", (value_p - value_m)/(2*du));
                                            expected.put("gamma", (delta_p - delta_m)/(2*du));

                                            // perturb rates and get rho and dividend rho
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.