Class ImpliedTrinomialTreeFxOptionCalibrator
- java.lang.Object
-
- com.opengamma.strata.pricer.fxopt.ImpliedTrinomialTreeFxOptionCalibrator
-
public class ImpliedTrinomialTreeFxOptionCalibrator extends Object
Utilities to calibrate implied trinomial tree to Black volatilities of FX options.
-
-
Constructor Summary
Constructors Constructor Description ImpliedTrinomialTreeFxOptionCalibrator(int nSteps)Calibrator with the specified number of time steps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecombiningTrinomialTreeDatacalibrateTrinomialTree(double timeToExpiry, CurrencyPair currencyPair, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)Calibrate trinomial tree to Black volatilities.RecombiningTrinomialTreeDatacalibrateTrinomialTree(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)Calibrate trinomial tree to Black volatilities by using a vanilla option.intgetNumberOfSteps()Obtains number of time steps.
-
-
-
Method Detail
-
getNumberOfSteps
public int getNumberOfSteps()
Obtains number of time steps.- Returns:
- number of time steps
-
calibrateTrinomialTree
public RecombiningTrinomialTreeData calibrateTrinomialTree(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calibrate trinomial tree to Black volatilities by using a vanilla option.ResolvedFxVanillaOptionis typically the underlying option of an exotic instrument to price using the calibrated tree, and is used to ensure that the grid points properly cover the lifetime of the target option.- Parameters:
option- the vanilla optionratesProvider- the rates providervolatilities- the Black volatility provider- Returns:
- the trinomial tree data
-
calibrateTrinomialTree
public RecombiningTrinomialTreeData calibrateTrinomialTree(double timeToExpiry, CurrencyPair currencyPair, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calibrate trinomial tree to Black volatilities.timeToExpirydetermines the coverage of the resulting trinomial tree. Thus this should match the time to expiry of the target instrument to price using the calibrated tree.- Parameters:
timeToExpiry- the time to expirycurrencyPair- the currency pairratesProvider- the rates providervolatilities- the Black volatility provider- Returns:
- the trinomial tree data
-
-