Class ImpliedTrinomialTreeFxOptionCalibrator


  • public class ImpliedTrinomialTreeFxOptionCalibrator
    extends Object
    Utilities to calibrate implied trinomial tree to Black volatilities of FX options.
    • Constructor Detail

      • ImpliedTrinomialTreeFxOptionCalibrator

        public ImpliedTrinomialTreeFxOptionCalibrator​(int nSteps)
        Calibrator with the specified number of time steps.
        Parameters:
        nSteps - 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.

        ResolvedFxVanillaOption is 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 option
        ratesProvider - the rates provider
        volatilities - 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.

        timeToExpiry determines 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 expiry
        currencyPair - the currency pair
        ratesProvider - the rates provider
        volatilities - the Black volatility provider
        Returns:
        the trinomial tree data