Class BlackFxVanillaOptionTradePricer


  • public class BlackFxVanillaOptionTradePricer
    extends java.lang.Object
    Pricer for FX vanilla option trades with a lognormal model.

    This function provides the ability to price an FxVanillaOptionTrade.

    • Method Detail

      • presentValue

        public MultiCurrencyAmount presentValue​(ResolvedFxVanillaOptionTrade trade,
                                                RatesProvider ratesProvider,
                                                BlackFxOptionVolatilities volatilities)
        Calculates the present value of the FX vanilla option trade.

        The present value of the trade is the value on the valuation date.

        Parameters:
        trade - the option trade
        ratesProvider - the rates provider
        volatilities - the Black volatility provider
        Returns:
        the present value of the trade
      • presentValueSensitivityRatesStickyStrike

        public PointSensitivities presentValueSensitivityRatesStickyStrike​(ResolvedFxVanillaOptionTrade trade,
                                                                           RatesProvider ratesProvider,
                                                                           BlackFxOptionVolatilities volatilities)
        Calculates the present value sensitivity of the FX vanilla option trade.

        The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.

        The volatility is fixed in this sensitivity computation.

        Parameters:
        trade - the option trade
        ratesProvider - the rates provider
        volatilities - the Black volatility provider
        Returns:
        the present value curve sensitivity of the trade
      • presentValueSensitivityModelParamsVolatility

        public PointSensitivities presentValueSensitivityModelParamsVolatility​(ResolvedFxVanillaOptionTrade trade,
                                                                               RatesProvider ratesProvider,
                                                                               BlackFxOptionVolatilities volatilities)
        Computes the present value sensitivity to the black volatility used in the pricing.

        The result is a single sensitivity to the volatility used.

        Parameters:
        trade - the option trade
        ratesProvider - the rates provider
        volatilities - the Black volatility provider
        Returns:
        the present value sensitivity
      • currentCash

        public CurrencyAmount currentCash​(ResolvedFxVanillaOptionTrade trade,
                                          java.time.LocalDate valuationDate)
        Calculates the current of the FX vanilla option trade.
        Parameters:
        trade - the option trade
        valuationDate - the valuation date
        Returns:
        the current cash amount