private double impliedVolatility( NormalFunctionData data, EuropeanVanillaOption option, double price) { return NormalFormulaRepository.impliedVolatility( price, data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), data.getNumeraire(), option.getPutCall()); }
@SuppressWarnings("synthetic-access") @Override public Double apply(NormalFunctionData data) { ArgChecker.notNull(data, "data"); return data.getNumeraire() * NormalFormulaRepository.price( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), option.getPutCall()); } };
/** * Computes forward delta of an option in the normally distributed assets hypothesis (Bachelier model). * * @param option the option description * @param data the model data * @return delta */ public double getDelta(EuropeanVanillaOption option, NormalFunctionData data) { ArgChecker.notNull(option, "option"); ArgChecker.notNull(data, "data"); return data.getNumeraire() * NormalFormulaRepository.delta( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), option.getPutCall()); }
/** * Computes theta of an option in the normally distributed assets hypothesis (Bachelier model). * * @param option the option description * @param data the model data * @return theta */ public double getTheta(EuropeanVanillaOption option, NormalFunctionData data) { ArgChecker.notNull(option, "option"); ArgChecker.notNull(data, "data"); return data.getNumeraire() * NormalFormulaRepository.theta( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), option.getPutCall()); }
/** * Computes the price of an option in the normally distributed assets hypothesis (Bachelier model). * The first order price derivatives are also provided. * * @param option the option description * @param data the model data * @return a {@link ValueDerivatives} with the price in the value and the derivatives with * respect to [0] the forward, [1] the volatility and [2] the strike */ public ValueDerivatives getPriceAdjoint(EuropeanVanillaOption option, NormalFunctionData data) { ArgChecker.notNull(option, "option"); ArgChecker.notNull(data, "data"); return NormalFormulaRepository.priceAdjoint( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), data.getNumeraire(), option.getPutCall()); }
/** * Computes forward gamma of an option in the normally distributed assets hypothesis (Bachelier model). * * @param option the option description * @param data the model data * @return gamma */ public double getGamma(EuropeanVanillaOption option, NormalFunctionData data) { ArgChecker.notNull(option, "option"); ArgChecker.notNull(data, "data"); return data.getNumeraire() * NormalFormulaRepository.gamma( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), option.getPutCall()); }
/** * Computes vega of an option in the normally distributed assets hypothesis (Bachelier model). * * @param option the option description * @param data the model data * @return vega */ public double getVega(EuropeanVanillaOption option, NormalFunctionData data) { ArgChecker.notNull(option, "option"); ArgChecker.notNull(data, "data"); return data.getNumeraire() * NormalFormulaRepository.vega( data.getForward(), option.getStrike(), option.getTimeToExpiry(), data.getNormalVolatility(), option.getPutCall()); }