Examples of rho()


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

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

                                        calculated.put("delta",  delta);
                                        calculated.put("gamma",  gamma);
View Full Code Here

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

                                                    final double value = option.NPV();
                                                    calculated.put("delta", option.delta());
                                                    calculated.put("gamma", option.gamma());
                                                    calculated.put("theta", option.theta());
                                                    calculated.put("rho", option.rho());
                                                    calculated.put("divRho", option.dividendRho());
                                                    calculated.put("vega", option.vega());

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

Examples of org.jquantlib.instruments.VanillaOption.rho()

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

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

        calculated = option.rho();
        error = Math.abs(Math.abs(calculated - values[i].result));
        if(error>tolerance) {
            REPORT_FAILURE("rho", 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.VanillaOption.rho()

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

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

        calculated = option.rho();
        error = Math.abs(Math.abs(calculated - values[i].result));
        if(error>tolerance) {
            REPORT_FAILURE("rho", 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.math.interpolations.SABRInterpolation.rho()

                    // Recover SABR calibration parameters
                    final boolean failed = false;
                    final double calibratedAlpha = sabrInterpolation.alpha();
                    final double calibratedBeta  = sabrInterpolation.beta();
                    final double calibratedNu    = sabrInterpolation.nu();
                    final double calibratedRho   = sabrInterpolation.rho();

                    // TODO: remove these declarations. Added just to make it compile.
//                    final double calibratedAlpha = Double.NaN;
//                    final double calibratedBeta  = Double.NaN;
//                    final double calibratedNu    = Double.NaN;
View Full Code Here

Examples of org.jquantlib.math.interpolations.SABRInterpolation.rho()

                    // Recover SABR calibration parameters
                    final boolean failed = false;
                    final double calibratedAlpha = sabrInterpolation.alpha();
                    final double calibratedBeta  = sabrInterpolation.beta();
                    final double calibratedNu    = sabrInterpolation.nu();
                    final double calibratedRho   = sabrInterpolation.rho();

                    // TODO: remove these declarations. Added just to make it compile.
//                    final double calibratedAlpha = Double.NaN;
//                    final double calibratedBeta  = Double.NaN;
//                    final double calibratedNu    = Double.NaN;
View Full Code Here

Examples of org.jquantlib.math.interpolations.SABRInterpolation.rho()

                    // Recover SABR calibration parameters
                    final double calibratedAlpha = sabrInterpolation.alpha();
                    final double calibratedBeta = sabrInterpolation.beta();
                    final double calibratedNu = sabrInterpolation.nu();
                    final double calibratedRho = sabrInterpolation.rho();
                    double error;

                    // compare results: alpha
                    error = abs(initialAlpha-calibratedAlpha);
                    assertFalse("\nfailed to calibrate alpha Sabr parameter:" +
View Full Code Here

Examples of org.jquantlib.pricingengines.BlackCalculator.rho()

        if (payoff.optionType() == Option.Type.Put) {
            greeks.vega -= riskFreeDiscount * forwardPrice * (dmuG_dsig + sigG * dsigG_dsig);
        }

        /*@Time*/ final double tRho = rfdc.yearFraction(process.riskFreeRate().currentLink().referenceDate(), a.exercise.lastDate());
        greeks.rho = black.rho(tRho)*timeSum/(N*tRho) - (tRho-timeSum/N) * r.value;

        /*@Time*/ final double tDiv = divdc.yearFraction(
                process.dividendYield().currentLink().referenceDate(),
                a.exercise.lastDate());

View Full Code Here

Examples of org.jquantlib.pricingengines.BlackCalculator.rho()

        greeks.gamma = black.gamma(spot);
        greeks.dividendRho = black.dividendRho(t_q)/2.0;

        /*@Time*/ final double t_r = rfdc.yearFraction(process.riskFreeRate().currentLink().referenceDate(),
                a.exercise.lastDate());
        greeks.rho = black.rho(t_r) + 0.5 * black.dividendRho(t_q);

        /*@Time*/ final double t_v = voldc.yearFraction(
                process.blackVolatility().currentLink().referenceDate(),
                a.exercise.lastDate());
        greeks.vega = black.vega(t_v)/Math.sqrt(3.0) +
View Full Code Here

Examples of org.jquantlib.pricingengines.BlackCalculator.rho()

            final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
            final DayCounter divdc = process.dividendYield().currentLink().dayCounter();
            final DayCounter voldc = process.blackVolatility().currentLink().dayCounter();

            double /*@Time*/ t = rfdc.yearFraction(process.riskFreeRate().currentLink().referenceDate(), a.exercise.lastDate());
            greeks.rho = black.rho(t);

            t = divdc.yearFraction(process.dividendYield().currentLink().referenceDate(), a.exercise.lastDate());
            greeks.dividendRho = black.dividendRho(t);

            t = voldc.yearFraction(process.blackVolatility().currentLink().referenceDate(), a.exercise.lastDate());
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.