Documentation of 'net.finmath.montecarlo.interestrate.LIBORMarketModel' Java class
LIBORMarketModel
net.finmath.montecarlo.interestrate

Class LIBORMarketModel

  • All Implemented Interfaces:
    LIBORMarketModelInterface, AbstractModelInterface


    public class LIBORMarketModel
    extends AbstractModel
    implements LIBORMarketModelInterface
    Implements a (generalized) LIBOR market model with some drift approximation methods.

    In its default case the class specifies a multi-factor LIBOR market model in its log-normal formulation, that is Lj = exp(Yj) where \[ dY_{j} = \mu_{j} dt + \lambda_{1,j} dW_{1} + \ldots + \lambda_{m,j} dW_{m} \]
    The model uses an AbstractLIBORCovarianceModel for the specification of (λ1,j,...,λm,j) as a covariance model. See AbstractModelInterface for details on the implemented interface

    However, the class is more general:
    • The model may be log-normal or normal specification with a given local volatility.
    • The class implements different measure(drift) / numeraire pairs: terminal measure and spot measure.
    • The class allows to configure a discounting curve (e.g. for "OIS discounting") using a simple deterministic zero spread. In this case, the numeraire \( N(t) \) is adjusted by \( \exp( \int_0^t -\lambda(\tau) d\tau ) \).

    The class specifies a LIBOR market model, that is Lj = f(Yj) where
    • f is f(x) = exp(x) (default, log-normal LIBOR Market Model) or
    • f is f(x) = x (normal model, used if property.set("stateSpace","NORMAL"))
    and
    dYj = μj dt + λ1,j dW1 + ... + λm,j dWm

    see AbstractModelInterface for details on the implemented interface.
    The model uses an AbstractLIBORCovarianceModel as a covariance model. If the covariance model is of type AbstractLIBORCovarianceModelParametric a calibration to swaptions can be performed.
    Note that λ may still depend on L, hence generating a log-normal dynamic for L even if the stateSpace property has been set to NORMAL.
    The map properties allows to configure the model. The following keys may be used:
    • measure: Possible values:
      • SPOT: Simulate under spot measure. In this case, the single curve numeraire is \( N(T_{i}) = \prod_{j=0}^{i-1} (1 + L(T_{j},T_{j+1};T_{j}) (T_{j+1}-T_{j})) \).
      • TERMINAL: Simulate under terminal measure. In this case, the single curve numeraire is \( N(T_{i}) = P(T_{n};T_{i}) = \prod_{j=i}^{n-1} (1 + L(T_{j},T_{j+1};T_{i}) (T_{j+1}-T_{j}))^{-1} \).
    • stateSpace: Possible values:
      • LOGNORMAL: The state space transform is set to exp, i.e., L = exp(Y). When the covariance model is deterministic, then this is the classical lognormal LIBOR market model. Note that the covariance model may still provide a local volatility function.
      • NORMAL: The state space transform is set to identity, i.e., L = Y. When the covariance model is deterministic, then this is a normal LIBOR market model. Note that the covariance model may still provide a local volatility function.
    • liborCap: An optional Double value applied as a cap to the LIBOR rates. May be used to limit the simulated valued to prevent values attaining POSITIVE_INFINITY and numerical problems. To disable the cap, set liborCap to Double.POSITIVE_INFINITY.

    The main task of this class is to calculate the risk-neutral drift and the corresponding numeraire given the covariance model. The calibration of the covariance structure is not part of this class. For the calibration of parametric models of the instantaneous covariance see AbstractLIBORCovarianceModelParametric.getCloneCalibrated(LIBORMarketModelInterface, AbstractLIBORMonteCarloProduct[], double[], double[], Map).
    See Also:
    The interface for numerical schemes., The interface for models provinding parameters to numerical schemes., The abstract covariance model plug ins., A parametic covariance model including a generic calibration algorithm.
    • Constructor Detail

      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                AnalyticModelInterface analyticModel,
                                ForwardCurveInterface forwardRateCurve,
                                DiscountCurveInterface discountCurve,
                                AbstractLIBORCovarianceModel covarianceModel,
                                LIBORMarketModel.CalibrationItem[] calibrationItems,
                                java.util.Map<java.lang.String,?> properties)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        If calibrationItems in non-empty and the covariance model is a parametric model, the covariance will be replaced by a calibrate version of the same model, i.e., the LIBOR Market Model will be calibrated.
        The map properties allows to configure the model. The following keys may be used:
        • measure: Possible values:
          • SPOT (String): Simulate under spot measure.
          • TERMINAL (String): Simulate under terminal measure.
        • stateSpace: Possible values:
          • LOGNORMAL (String): Simulate L = exp(Y).
          • NORMAL (String): Simulate L = Y.
        • liborCap: An optional Double value applied as a cap to the LIBOR rates. May be used to limit the simulated valued to prevent values attaining POSITIVE_INFINITY and numerical problems. To disable the cap, set liborCap to Double.POSITIVE_INFINITY.
        • calibrationParameters: Possible values:
          • Map<String,Object> a parameter map with the following key/value pairs:
            • accuracy: Double specifying the required solver accuracy.
            • maxIterations: Integer specifying the maximum iterations for the solver.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        analyticModel - The associated analytic model of this model (containing the associated market data objects like curve).
        forwardRateCurve - The initial values for the forward rates.
        discountCurve - The discount curve to use. This will create an LMM model with a deterministic zero-spread discounting adjustment.
        covarianceModel - The covariance model to use.
        calibrationItems - The vector of calibration items (a union of a product, target value and weight) for the objective function sum weight(i) * (modelValue(i)-targetValue(i).
        properties - Key value map specifying properties like measure and stateSpace.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                AbstractLIBORCovarianceModel covarianceModel)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        covarianceModel - The covariance model to use.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                DiscountCurveInterface discountCurve,
                                AbstractLIBORCovarianceModel covarianceModel)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        discountCurve - The discount curve to use. This will create an LMM model with a deterministic zero-spread discounting adjustment.
        covarianceModel - The covariance model to use.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                AbstractLIBORCovarianceModel covarianceModel,
                                AbstractSwaptionMarketData swaptionMarketData)
                         throws CalculationException
        Creates a LIBOR Market Model using a given covariance model and calibrating this model to given swaption volatility data.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        covarianceModel - The covariance model to use.
        swaptionMarketData - The set of swaption values to calibrate to.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                DiscountCurveInterface discountCurve,
                                AbstractLIBORCovarianceModel covarianceModel,
                                AbstractSwaptionMarketData swaptionMarketData)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        discountCurve - The discount curve to use. This will create an LMM model with a deterministic zero-spread discounting adjustment.
        covarianceModel - The covariance model to use.
        swaptionMarketData - The set of swaption values to calibrate to.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                DiscountCurveInterface discountCurve,
                                AbstractLIBORCovarianceModel covarianceModel,
                                AbstractSwaptionMarketData swaptionMarketData,
                                java.util.Map<java.lang.String,?> properties)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        discountCurve - The discount curve to use. This will create an LMM model with a deterministic zero-spread discounting adjustment.
        covarianceModel - The covariance model to use.
        swaptionMarketData - The set of swaption values to calibrate to.
        properties - Key value map specifying properties like measure and stateSpace.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • LIBORMarketModel

        public LIBORMarketModel(TimeDiscretizationInterface liborPeriodDiscretization,
                                ForwardCurveInterface forwardRateCurve,
                                DiscountCurveInterface discountCurve,
                                AbstractLIBORCovarianceModel covarianceModel,
                                LIBORMarketModel.CalibrationItem[] calibrationItems,
                                java.util.Map<java.lang.String,?> properties)
                         throws CalculationException
        Creates a LIBOR Market Model for given covariance.
        If calibrationItems in non-empty and the covariance model is a parametric model, the covariance will be replaced by a calibrate version of the same model, i.e., the LIBOR Market Model will be calibrated.
        The map properties allows to configure the model. The following keys may be used:
        • measure: Possible values:
          • SPOT (String): Simulate under spot measure.
          • TERMINAL (String): Simulate under terminal measure.
        • stateSpace: Possible values:
          • LOGNORMAL (String): Simulate L = exp(Y).
          • NORMAL (String): Simulate L = Y.
        • calibrationParameters: Possible values:
          • Map<String,Object> a parameter map with the following key/value pairs:
            • accuracy: Double specifying the required solver accuracy.
            • maxIterations: Integer specifying the maximum iterations for the solver.
        Parameters:
        liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
        forwardRateCurve - The initial values for the forward rates.
        discountCurve - The discount curve to use. This will create an LMM model with a deterministic zero-spread discounting adjustment.
        covarianceModel - The covariance model to use.
        calibrationItems - The vector of calibration items (a union of a product, target value and weight) for the objective function sum weight(i) * (modelValue(i)-targetValue(i).
        properties - Key value map specifying properties like measure and stateSpace.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
    • Method Detail

      • getNumeraire

        public RandomVariableInterface getNumeraire(double time)
                                             throws CalculationException
        Return the numeraire at a given time. The numeraire is provided for interpolated points. If requested on points which are not part of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal value. See ISBN 0470047224 for details.
        Specified by:
        getNumeraire in interface AbstractModelInterface
        Parameters:
        time - Time time t for which the numeraire should be returned N(t).
        Returns:
        The numeraire at the specified time as RandomVariableInterface
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • getInitialState

        public RandomVariableInterface[] getInitialState()
        Description copied from interface: AbstractModelInterface
        Returns the initial value of the state variable of the process Y, not to be confused with the initial value of the model X (which is the state space transform applied to this state value.
        Specified by:
        getInitialState in interface AbstractModelInterface
        Returns:
        The initial value of the state variable of the process Y(t=0).
      • getFactorLoading

        public RandomVariableInterface[] getFactorLoading(int timeIndex,
                                                          int componentIndex,
                                                          RandomVariableInterface[] realizationAtTimeIndex)
        Description copied from interface: AbstractModelInterface
        This method has to be implemented to return the factor loadings, i.e. the coefficient vector
        λj = (λ1,j, ..., λm,j) such that X = f(Y) and
        dYj = μj dt + λ1,j dW1 + ... + λm,j dWm
        in an m-factor model. Here j denotes index of the component of the resulting process.
        Specified by:
        getFactorLoading in interface AbstractModelInterface
        Parameters:
        timeIndex - The time index (related to the model times discretization).
        componentIndex - The index j of the driven component.
        realizationAtTimeIndex - The realization of X at the time corresponding to timeIndex (in order to implement local and stochastic volatlity models).
        Returns:
        The factor loading for given factor and component.
      • getLiborPeriod

        public double getLiborPeriod(int timeIndex)
        Description copied from interface: LIBORMarketModelInterface
        The period start corresponding to a given forward rate discretization index.
        Specified by:
        getLiborPeriod in interface LIBORMarketModelInterface
        Parameters:
        timeIndex - The index corresponding to a given time (interpretation is start of period)
        Returns:
        The period start corresponding to a given forward rate discretization index.
      • getLiborPeriodIndex

        public int getLiborPeriodIndex(double time)
        Description copied from interface: LIBORMarketModelInterface
        Same as java.util.Arrays.binarySearch(liborPeriodDiscretization,time). Will return a negative value if the time is not found, but then -index-1 corresponds to the index of the smallest time greater than the given one.
        Specified by:
        getLiborPeriodIndex in interface LIBORMarketModelInterface
        Parameters:
        time - The period start.
        Returns:
        The index corresponding to a given time (interpretation is start of period)
      • getIntegratedLIBORCovariance

        public double[][][] getIntegratedLIBORCovariance()
        Description copied from interface: LIBORMarketModelInterface
        Returns the integrated instantaneous log-forward rate covariance, i.e., \int_0^t_i d log(L_j) d log(L_k) dt. The array returned has the parametrization [i][j][k], i.e., integratedLIBORCovariance[timeIndex][componentIndex1][componentIndex2].
        Specified by:
        getIntegratedLIBORCovariance in interface LIBORMarketModelInterface
        Returns:
        The integrated instantaneous log-LIBOR covariance.
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • getSwaptionMarketData

        public AbstractSwaptionMarketData getSwaptionMarketData()
        Return the swaption market data used for calibration (if any, may be null).
        Returns:
        The swaption market data used for calibration (if any, may be null).
      • getCloneWithModifiedData

        public LIBORMarketModel getCloneWithModifiedData(java.util.Map<java.lang.String,java.lang.Object> dataModified)
                                                  throws CalculationException
        Description copied from interface: LIBORMarketModelInterface
        Create a new object implementing LIBORMarketModelInterface, using the new data.
        Specified by:
        getCloneWithModifiedData in interface LIBORMarketModelInterface
        Parameters:
        dataModified - A map with values to be used in constructions (keys are identical to parameter names of the constructors).
        Returns:
        A new object implementing LIBORMarketModelInterface, using the new data.
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.