Examples of delta()


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

        final double variance = process.blackVolatility().currentLink().blackVariance(a.exercise.lastDate(), payoff.strike());
        final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        r.value = black.value();
        greeks.delta = black.delta(spot);
        greeks.gamma = black.gamma(spot);

        final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
        final DayCounter voldc = process.blackVolatility().currentLink().dayCounter();
        /*@Time*/ double t = voldc.yearFraction(process.blackVolatility().currentLink().referenceDate(), a.exercise.lastDate());
View Full Code Here

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

                delta_rho += cashflow.amount() * process.time(d) * process.riskFreeRate().currentLink().discount(t);
            }
        }
        t = process.time(a.exercise.lastDate());
        try {
            greeks.theta = black.theta(spot, t) + delta_theta * black.delta(spot);
        } catch (final ArithmeticException e) {
            greeks.theta = Constants.NULL_REAL;
        }

        greeks.rho = black.rho(t) + delta_rho * black.delta(spot);
 
View Full Code Here

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

            greeks.theta = black.theta(spot, t) + delta_theta * black.delta(spot);
        } catch (final ArithmeticException e) {
            greeks.theta = Constants.NULL_REAL;
        }

        greeks.rho = black.rho(t) + delta_rho * black.delta(spot);
    }

}
View Full Code Here

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

        final double forwardPrice = spot * dividendDiscount / riskFreeDiscount;

        final BlackCalculator black = new BlackCalculator(striked_payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        r.value = prices.valueAtCenter() - controlPrices.valueAtCenter() + black.value();
        greeks.delta = prices.firstDerivativeAtCenter() - controlPrices.firstDerivativeAtCenter() + black.delta(spot);
        greeks.gamma = prices.secondDerivativeAtCenter() - controlPrices.secondDerivativeAtCenter() + black.gamma(spot);
        r.additionalResults().put("priceCurve", prices);
    }
}
View Full Code Here

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

            // early exercise is never optimal - use Black formula
            final double /*@Real*/ forwardPrice = spot * dividendDiscount / riskFreeDiscount;
            final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

            r.value           = black.value();
            greeks.delta            = black.delta(spot);
            moreGreeks.deltaForward = black.deltaForward();
            moreGreeks.elasticity   = black.elasticity(spot);
            greeks.gamma            = black.gamma(spot);

            final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
View Full Code Here

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

        final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        if (dividendDiscount>=1.0 && payoff.optionType()==Option.Type.Call) {
            // early exercise never optimal
            r.value           = black.value();
            greeks.delta            = black.delta(spot);
            moreGreeks.deltaForward = black.deltaForward();
            moreGreeks.elasticity   = black.elasticity(spot);
            greeks.gamma            = black.gamma(spot);

            final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
View Full Code Here

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

        discount(a.exercise.lastDate());

        final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        r.value = black.value();
        greeks.delta = futureWeight*black.delta(forwardPrice)*forwardPrice/s;
        greeks.gamma = forwardPrice*futureWeight/(s*s)*(black.gamma(forwardPrice)*futureWeight*forwardPrice
                - pastWeight*black.delta(forwardPrice) );

        /*@Real*/ double Nx_1, nx_1;
        final CumulativeNormalDistribution CND = new CumulativeNormalDistribution();
View Full Code Here

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

        final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        r.value = black.value();
        greeks.delta = futureWeight*black.delta(forwardPrice)*forwardPrice/s;
        greeks.gamma = forwardPrice*futureWeight/(s*s)*(black.gamma(forwardPrice)*futureWeight*forwardPrice
                - pastWeight*black.delta(forwardPrice) );

        /*@Real*/ double Nx_1, nx_1;
        final CumulativeNormalDistribution CND = new CumulativeNormalDistribution();
        final NormalDistribution ND = new NormalDistribution();

View Full Code Here

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

        final double variance = process.blackVolatility().currentLink().blackVariance(a.exercise.lastDate(), payoff.strike());
        final BlackCalculator black = new BlackCalculator(payoff, forwardPrice, Math.sqrt(variance), riskFreeDiscount);

        r.value = black.value();
        greeks.delta = black.delta(spot);
        greeks.gamma = black.gamma(spot);

        final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
        final DayCounter voldc = process.blackVolatility().currentLink().dayCounter();
        /*@Time*/ double t = voldc.yearFraction(process.blackVolatility().currentLink().referenceDate(), a.exercise.lastDate());
View Full Code Here

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

                delta_rho += cashflow.amount() * process.time(d) * process.riskFreeRate().currentLink().discount(t);
            }
        }
        t = process.time(a.exercise.lastDate());
        try {
            greeks.theta = black.theta(spot, t) + delta_theta * black.delta(spot);
        } catch (final ArithmeticException e) {
            greeks.theta = Constants.NULL_REAL;
        }

        greeks.rho = black.rho(t) + delta_rho * black.delta(spot);
 
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.