Class VannaVolgaFxVanillaOptionProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.fxopt.VannaVolgaFxVanillaOptionProductPricer
-
public class VannaVolgaFxVanillaOptionProductPricer extends Object
Pricing method for vanilla Forex option transactions with Vanna-Volga method.The volatilities are expressed using
BlackFxOptionSmileVolatilities
. Each smile of the term structure consists of 3 data points, where the middle point corresponds to ATM volatility.Reference: The vanna-volga method for implied volatilities (2007), A. Castagna and F. Mercurio, Risk, 106-111, January 2007. OG implementation: Vanna-volga method for Forex options, version 1.0, June 2012.
-
-
Field Summary
Fields Modifier and Type Field Description static VannaVolgaFxVanillaOptionProductPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description VannaVolgaFxVanillaOptionProductPricer(DiscountingFxSingleProductPricer fxPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the currency exposure of the foreign exchange vanilla option product.CurrencyAmount
presentValue(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the present value of the foreign exchange vanilla option product.PointSensitivityBuilder
presentValueSensitivityModelParamsVolatility(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Computes the present value sensitivity to the black volatilities used in the pricing.PointSensitivityBuilder
presentValueSensitivityRatesStickyStrike(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the present value sensitivity of the foreign exchange vanilla option product.double
price(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the price of the foreign exchange vanilla option product.
-
-
-
Field Detail
-
DEFAULT
public static final VannaVolgaFxVanillaOptionProductPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
VannaVolgaFxVanillaOptionProductPricer
public VannaVolgaFxVanillaOptionProductPricer(DiscountingFxSingleProductPricer fxPricer)
Creates an instance.- Parameters:
fxPricer
- the pricer forResolvedFxSingle
-
-
Method Detail
-
price
public double price(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the price of the foreign exchange vanilla option product.The price of the product is the value on the valuation date for one unit of the base currency and is expressed in the counter currency. The price does not take into account the long/short flag. See
presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionSmileVolatilities)
for scaling and currency.- Parameters:
option
- the option productratesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the price of the product
-
presentValue
public CurrencyAmount presentValue(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the present value of the foreign exchange vanilla option product.The present value of the product is the value on the valuation date. It is expressed in the counter currency.
- Parameters:
option
- the option productratesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the present value of the product
-
presentValueSensitivityRatesStickyStrike
public PointSensitivityBuilder presentValueSensitivityRatesStickyStrike(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the present value sensitivity of the foreign exchange vanilla option product.The present value sensitivity of the product is the sensitivity of
presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionSmileVolatilities)
to the underlying curves.The implied strikes and weights are fixed in this sensitivity computation.
- Parameters:
option
- the option productratesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the present value curve sensitivity of the product
-
presentValueSensitivityModelParamsVolatility
public PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Computes the present value sensitivity to the black volatilities used in the pricing.The implied strikes and weights are fixed in this sensitivity computation.
- Parameters:
option
- the option productratesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the present value sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the currency exposure of the foreign exchange vanilla option product.- Parameters:
option
- the option productratesProvider
- the rates providervolatilities
- the Black volatility provider- Returns:
- the currency exposure
-
-