Examples of theta()


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

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

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

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

                                                    vol.setValue(v);

                                                    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) {
View Full Code Here

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

                                        expected.put("delta", refOption.delta());
                                        expected.put("gamma", refOption.gamma());
                                        expected.put("theta", refOption.theta());
                                        calculated.put("delta", option.delta());
                                        calculated.put("gamma", option.gamma());
                                        calculated.put("theta", option.theta());
                                    }

                                    for (final Entry<String, Double> entry : calculated.entrySet()) {
                                        final String greek = entry.getKey();
                                        final double expct = expected.get(greek), calcl = calculated.get(greek), tol = tolerance.get(greek);
View Full Code Here

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

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

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

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

                                        expected.put("delta", refOption.delta());
                                        expected.put("gamma", refOption.gamma());
                                        expected.put("theta", refOption.theta());
                                        calculated.put("delta", option.delta());
                                        calculated.put("gamma", option.gamma());
                                        calculated.put("theta", option.theta());
                                    }
                                    for (final Map.Entry<String, Double> it : calculated.entrySet()) {

                                        final String greek = it.getKey();
                                        /* @Real */final double expct = expected.get(greek);
View Full Code Here

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

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

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

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

                                        expected.put("delta", refOption.delta());
                                        expected.put("gamma", refOption.gamma());
                                        expected.put("theta", refOption.theta());
                                        calculated.put("delta", option.delta());
                                        calculated.put("gamma", option.gamma());
                                        calculated.put("theta", option.theta());
                                    }

                                    for (final Entry<String, Double> entry : calculated.entrySet()) {
                                        final String greek = entry.getKey();
                                        final double expct = expected.get(greek), calcl = calculated.get(greek), tol = tolerance.get(greek);
View Full Code Here

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

                                        expected.put("delta", refOption.delta());
                                        expected.put("gamma", refOption.gamma());
                                        expected.put("theta", refOption.theta());
                                        calculated.put("delta", option.delta());
                                        calculated.put("gamma", option.gamma());
                                        calculated.put("theta", option.theta());
                                    }
                                    for (final Map.Entry<String, Double> it : calculated.entrySet()) {

                                        final String greek = it.getKey();
                                        /* @Real */final double expct = expected.get(greek);
View Full Code Here

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

                a.exercise.lastDate());
        greeks.vega = black.vega(t_v)/Math.sqrt(3.0) +
        black.dividendRho(t_q)*volatility/6.0;

        try {
            greeks.theta = black.theta(spot, t_v);
        } catch (final ArithmeticException e) {
            greeks.theta = Constants.NULL_REAL;
        }
    }

View Full Code Here

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

            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());
            greeks.vega        = black.vega(t);
            greeks.theta       = black.theta(spot, t);

            moreGreeks.thetaPerDay        = black.thetaPerDay(spot, t);
            moreGreeks.strikeSensitivity  = black.strikeSensitivity();
            moreGreeks.itmCashProbability = black.itmCashProbability();
        } else {
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.