Examples of NPV()


Examples of org.jquantlib.helpers.CRRAmericanDividendOptionHelper.NPV()

                type, underlying, strike, riskFreeRate, dividendYield, volatility,
                settlementDate, maturityDate,
                divDates, divAmounts,
                calendar, dc);

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

Examples of org.jquantlib.helpers.CRREuropeanDividendOptionHelper.NPV()

                type, underlying, strike, riskFreeRate, dividendYield, volatility,
                settlementDate, maturityDate,
                divDates, divAmounts,
                calendar, dc);

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

Examples of org.jquantlib.helpers.FDAmericanDividendOptionHelper.NPV()

                type, underlying, strike, riskFreeRate, dividendYield, volatility,
                settlementDate, maturityDate,
                divDates, divAmounts,
                calendar, dc);

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

Examples of org.jquantlib.helpers.FDEuropeanDividendOptionHelper.NPV()

                type, underlying, strike, riskFreeRate, dividendYield, volatility,
                settlementDate, maturityDate,
                divDates, divAmounts,
                calendar, dc);

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

Examples of org.jquantlib.instruments.BarrierOption.NPV()

            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

Examples of org.jquantlib.instruments.ContinuousAveragingAsianOption.NPV()

        final Exercise exercise = new EuropeanExercise(exerciseDate);

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

        /* @Real */double calculated = option.NPV();
        /* @Real */final double expected = 4.6922;
        /* @Real */double tolerance = 1.0e-4;

        if (Math.abs(calculated - expected) > tolerance) {
            reportFailure("value", averageType, runningAccumulator, pastFixings, new ArrayList<Date>(), payoff, exercise, spot
View Full Code Here

Examples of org.jquantlib.instruments.DiscreteAveragingAsianOption.NPV()

        final DiscreteAveragingAsianOption option = new DiscreteAveragingAsianOption(
                averageType, runningAccumulator, pastFixings, fixingDates, payoff, exercise);
        option.setPricingEngine(engine);

        /* @Real */final double calculated = option.NPV();
        /* @Real */final double expected = 5.3425606635;

        /* @Real */final double tolerance = 1e-10;
        if (Math.abs(calculated - expected) > tolerance) {
            reportFailure("value", averageType, runningAccumulator, pastFixings, fixingDates, payoff, exercise, spot.value(),
View Full Code Here

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

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

                                /* @Real */ final double calculated = option.NPV();
                                /* @Real */ final double expected = ref_option.NPV();
                                /* @Real */ final double error = Math.abs(calculated-expected);
                                if (error > tolerance)
                                    REPORT_FAILURE("value start limit",
                                                   payoff, exercise,
View Full Code Here

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

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

        /* @Real */ final double calculated = option.NPV();
        /* @Real */ final double error = Math.abs(calculated-expected);
        if (error > tolerance)
            REPORT_FAILURE("value start limit",
                           payoff, exercise,
                           u, q, r, today, v,
View Full Code Here

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

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

                                /* @Real */ final double calculated = option.NPV();
                                spot.setValue(u-dividendValue);
                                /* @Real */ final double expected = ref_option.NPV();
                                /* @Real */ final double error = Math.abs(calculated-expected);
                                if (error > tolerance)
                                    REPORT_FAILURE("value", payoff, exercise,
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.