public class BlackFxVanillaOptionProductPricer extends Object
This function provides the ability to price an ResolvedFxVanillaOption.
All of the computation is be based on the counter currency of the underlying FX transaction. For example, price, PV and risk measures of the product will be expressed in USD for an option on EUR/USD.
| Modifier and Type | Field and Description |
|---|---|
static BlackFxVanillaOptionProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
BlackFxVanillaOptionProductPricer(DiscountingFxSingleProductPricer fxPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the currency exposure of the foreign exchange vanilla option product.
|
double |
delta(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the delta of the foreign exchange vanilla option product.
|
FxRate |
forwardFxRate(ResolvedFxVanillaOption option,
RatesProvider ratesProvider)
Calculates the forward exchange rate.
|
double |
gamma(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the gamma of the foreign exchange vanilla option product.
|
double |
impliedVolatility(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the implied Black volatility of the foreign exchange vanilla option product.
|
CurrencyAmount |
presentValue(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value of the foreign exchange vanilla option product.
|
CurrencyAmount |
presentValueDelta(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value delta of the foreign exchange vanilla option product.
|
CurrencyAmount |
presentValueGamma(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value delta of the foreign exchange vanilla option product.
|
PointSensitivityBuilder |
presentValueSensitivityModelParamsVolatility(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Computes the present value sensitivity to the black volatility used in the pricing.
|
PointSensitivities |
presentValueSensitivityRatesStickyStrike(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value sensitivity of the foreign exchange vanilla option product.
|
CurrencyAmount |
presentValueTheta(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value theta of the foreign exchange vanilla option product.
|
CurrencyAmount |
presentValueVega(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value vega of the foreign exchange vanilla option product.
|
double |
price(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the price of the foreign exchange vanilla option product.
|
double |
theta(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the Black theta of the foreign exchange vanilla option product.
|
double |
vega(ResolvedFxVanillaOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the vega of the foreign exchange vanilla option product.
|
public static final BlackFxVanillaOptionProductPricer DEFAULT
public BlackFxVanillaOptionProductPricer(DiscountingFxSingleProductPricer fxPricer)
fxPricer - the pricer for ResolvedFxSinglepublic double price(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
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.BlackFxOptionVolatilities) for scaling and currency.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValue(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value of the product is the value on the valuation date. It is expressed in the counter currency.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic double delta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The delta is the first derivative of price(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to spot.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValueDelta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value delta is the first derivative of presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to spot.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic PointSensitivities presentValueSensitivityRatesStickyStrike(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
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.BlackFxOptionVolatilities) to
the underlying curves.
The volatility is fixed in this sensitivity computation.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic double gamma(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The gamma is the second derivative of price(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to spot.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValueGamma(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value gamma is the second derivative of the presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to spot.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic double vega(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The vega is the first derivative of price(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to volatility.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValueVega(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value vega is the first derivative of the presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to volatility.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic PointSensitivityBuilder presentValueSensitivityModelParamsVolatility(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The result is a single sensitivity to the volatility used.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic double theta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The theta is the negative of the first derivative of price(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with respect to time parameter
in Black formula (the discounted driftless theta).
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValueTheta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value theta is the negative of the first derivative of presentValue(com.opengamma.strata.product.fxopt.ResolvedFxVanillaOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) with time parameter
in Black formula, i.e., the driftless theta of the present value.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic FxRate forwardFxRate(ResolvedFxVanillaOption option, RatesProvider ratesProvider)
option - the option productratesProvider - the rates providerpublic double impliedVolatility(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerIllegalArgumentException - if the option has expiredpublic MultiCurrencyAmount currencyExposure(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.