/** * Computes the present value curve sensitivity of a transaction. * * @param transaction The future option transaction. * @param curves The yield curve bundle. * @return The present value curve sensitivity. */ public InterestRateCurveSensitivity presentValueCurveSensitivity( final BondFutureOptionPremiumTransaction transaction, final YieldCurveBundle curves) { ArgumentChecker.notNull(transaction, "transaction"); ArgumentChecker.notNull(curves, "curves"); final InterestRateCurveSensitivity premiumSensitivity = PVCSC.visit(transaction.getPremium(), curves); final InterestRateCurveSensitivity securitySensitivity = METHOD_SECURITY.priceCurveSensitivity(transaction.getUnderlyingOption(), curves); return premiumSensitivity.plus( securitySensitivity.multipliedBy( transaction.getQuantity() * transaction.getUnderlyingOption().getUnderlyingFuture().getNotional())); }
/** * Computes the present value vega of a transaction. * * @param transaction The future option transaction. * @param blackData The curve and Black volatility data. * @return The delta. */ public double presentValueVega( final BondFutureOptionPremiumTransaction transaction, final YieldCurveWithBlackCubeBundle blackData) { ArgumentChecker.notNull(transaction, "transaction"); ArgumentChecker.notNull(blackData, "Black data"); final double securityVega = METHOD_SECURITY.optionPriceVega(transaction.getUnderlyingOption(), blackData); final double txnVega = securityVega * transaction.getQuantity() * transaction.getUnderlyingOption().getUnderlyingFuture().getNotional(); return txnVega; }
/** * Compute the present value of a bond future option transaction from the quoted option price. * * @param option The future option, not null * @param curves The curves, not null * @param price The quoted price * @return The present value. */ public CurrencyAmount presentValueFromPrice( final BondFutureOptionPremiumTransaction option, final YieldCurveBundle curves, final double price) { ArgumentChecker.notNull(option, "option"); ArgumentChecker.notNull(curves, "curves"); final Currency ccy = option.getUnderlyingOption().getCurrency(); final CurrencyAmount premiumPV = option.getPremium().accept(PVC, curves).getCurrencyAmount(ccy); final double optionPV = price * option.getQuantity() * option.getUnderlyingOption().getUnderlyingFuture().getNotional(); return premiumPV.plus(optionPV); }