public class ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer extends Object
This function provides the ability to price an ResolvedFxSingleBarrierOption.
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 ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer()
Pricer with the default number of time steps.
|
ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer(int nSteps)
Pricer with the specified number of time steps.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the currency exposure of the FX barrier option product.
|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities,
RecombiningTrinomialTreeData treeData)
Calculates the currency exposure of the FX barrier option product.
|
ImpliedTrinomialTreeFxOptionCalibrator |
getCalibrator()
Obtains the calibrator.
|
CurrencyAmount |
presentValue(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value of the FX barrier option product.
|
CurrencyAmount |
presentValue(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities,
RecombiningTrinomialTreeData treeData)
Calculates the present value of the FX barrier option product.
|
CurrencyParameterSensitivities |
presentValueSensitivityRates(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the present value sensitivity of the FX barrier option product.
|
CurrencyParameterSensitivities |
presentValueSensitivityRates(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities,
RecombiningTrinomialTreeData baseTreeData)
Calculates the present value sensitivity of the FX barrier option product.
|
double |
price(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities)
Calculates the price of the FX barrier option product.
|
double |
price(ResolvedFxSingleBarrierOption option,
RatesProvider ratesProvider,
BlackFxOptionVolatilities volatilities,
RecombiningTrinomialTreeData treeData)
Calculates the price of the FX barrier option product.
|
public static final ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer DEFAULT
public ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer()
public ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer(int nSteps)
nSteps - number of time stepspublic ImpliedTrinomialTreeFxOptionCalibrator getCalibrator()
public double price(ResolvedFxSingleBarrierOption 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 for scaling and currency.
The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic double price(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities, RecombiningTrinomialTreeData treeData)
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 presnetValue for scaling and currency.
This assumes the tree is already calibrated and the tree data is stored as RecombiningTrinomialTreeData.
The tree data should be consistent with the pricer and other inputs, see validateData(com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities, com.opengamma.strata.pricer.fxopt.RecombiningTrinomialTreeData).
option - the option productratesProvider - the rates providervolatilities - the Black volatility providertreeData - the trinomial tree datapublic CurrencyAmount presentValue(ResolvedFxSingleBarrierOption 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.
The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyAmount presentValue(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities, RecombiningTrinomialTreeData treeData)
The present value of the product is the value on the valuation date. It is expressed in the counter currency.
This assumes the tree is already calibrated and the tree data is stored as RecombiningTrinomialTreeData.
The tree data should be consistent with the pricer and other inputs, see validateData(com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities, com.opengamma.strata.pricer.fxopt.RecombiningTrinomialTreeData).
option - the option productratesProvider - the rates providervolatilities - the Black volatility providertreeData - the trinomial tree datapublic CurrencyParameterSensitivities presentValueSensitivityRates(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The present value sensitivity of the product is the sensitivity of presentValue(com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) to
the underlying curve parameters.
The sensitivity is computed by bump and re-price.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic CurrencyParameterSensitivities presentValueSensitivityRates(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities, RecombiningTrinomialTreeData baseTreeData)
The present value sensitivity of the product is the sensitivity of presentValue(com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities) to
the underlying curve parameters.
The sensitivity is computed by bump and re-price.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerbaseTreeData - the trinomial tree datapublic MultiCurrencyAmount currencyExposure(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
The trinomial tree is first calibrated to Black volatilities, then the price is computed based on the calibrated tree.
option - the option productratesProvider - the rates providervolatilities - the Black volatility providerpublic MultiCurrencyAmount currencyExposure(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities, RecombiningTrinomialTreeData treeData)
This assumes the tree is already calibrated and the tree data is stored as RecombiningTrinomialTreeData.
The tree data should be consistent with the pricer and other inputs, see validateData(com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption, com.opengamma.strata.pricer.rate.RatesProvider, com.opengamma.strata.pricer.fxopt.BlackFxOptionVolatilities, com.opengamma.strata.pricer.fxopt.RecombiningTrinomialTreeData).
option - the option productratesProvider - the rates providervolatilities - the Black volatility providertreeData - the trinomial tree dataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.