/** * 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 InterestRateFutureOptionMarginTransaction transaction, final YieldCurveBundle curves) { InterestRateCurveSensitivity securitySensitivity = _securityMethod.priceCurveSensitivity(transaction.getUnderlyingOption(), curves); return securitySensitivity.multipliedBy( transaction.getQuantity() * transaction.getUnderlyingOption().getUnderlyingFuture().getNotional() * transaction.getUnderlyingOption().getUnderlyingFuture().getPaymentAccrualFactor()); }
/** * Computes the present value of a transaction from the future price and curve/volatility data. * * @param transaction The future option transaction. * @param curves The yield curve bundle. * @param priceFuture The price of the underlying future. * @return The present value. */ public CurrencyAmount presentValueFromFuturePrice( final InterestRateFutureOptionMarginTransaction transaction, final YieldCurveBundle curves, final double priceFuture) { double priceSecurity = _securityMethod.optionPriceFromFuturePrice( transaction.getUnderlyingOption(), curves, priceFuture); CurrencyAmount priceTransaction = presentValueFromPrice(transaction, priceSecurity); return priceTransaction; }
@Override public CurrencyAmount presentValue( final InstrumentDerivative instrument, final YieldCurveBundle curves) { ArgumentChecker.isTrue( instrument instanceof InterestRateFutureOptionMarginTransaction, "The instrument should be a InterestRateFutureOptionMarginTransaction"); final InterestRateFutureOptionMarginTransaction transaction = (InterestRateFutureOptionMarginTransaction) instrument; double priceSecurity = _securityMethod.optionPrice(transaction.getUnderlyingOption(), curves); CurrencyAmount pvTransaction = presentValueFromPrice(transaction, priceSecurity); return pvTransaction; }