Skip navigation links
finMath lib documentation
net.finmath.montecarlo.interestrate.models

## Class LIBORMarketModelWithTenorRefinement

• All Implemented Interfaces:
TermStructureModel, ProcessModel

public class LIBORMarketModelWithTenorRefinement
extends AbstractProcessModel
implements TermStructureModel
Implements a discretized Heath-Jarrow-Morton model / LIBOR market model with dynamic tenor refinement, see https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2884699.

In its default case the class specifies a multi-factor LIBOR market model, that is $$L_{j} = \frac{1}{T_{j+1}-T_{j}} ( exp(Y_{j}) - 1 )$$, 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 ProcessModel 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 (through a local volatility model).
The simulation is performed under spot measure, that is, the numeraire is $$N(T_{i}) = \prod_{j=0}^{i-1} (1 + L(T_{j},T_{j+1};T_{j}) (T_{j+1}-T_{j}))$$. The map properties allows to configure the model. The following keys may be used:
• 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.
Version:
1.2
Author:
Christian Fries
See Also:
The interface for numerical schemes., The interface for models provinding parameters to numerical schemes., https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2884699
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
static class  LIBORMarketModelWithTenorRefinement.Driftapproximation
• ### Constructor Summary

Constructors
Constructor and Description
LIBORMarketModelWithTenorRefinement(TimeDiscretization[] liborPeriodDiscretizations, Integer[] numberOfDiscretizationIntervalls, AnalyticModel analyticModel, ForwardCurve forwardRateCurve, DiscountCurve discountCurve, TermStructureCovarianceModelInterface covarianceModel, CalibrationProduct[] calibrationProducts, Map<String,?> properties)
Creates a model for given covariance.
• ### Method Summary

All Methods
Modifier and Type Method and Description
RandomVariable applyStateSpaceTransform(int componentIndex, RandomVariable randomVariable)
Applies the state space transform fi to the given state random variable such that Yi → fi(Yi) =: Xi.
RandomVariable applyStateSpaceTransformInverse(int componentIndex, RandomVariable randomVariable)
Object clone()
AnalyticModel getAnalyticModel()
Return the associated analytic model, a collection of market date object like discount curve, forward curve and volatility surfaces.
TermStructureModel getCloneWithModifiedData(Map<String,Object> dataModified)
Create a new object implementing TermStructureModel, using the new data.
TermStructureCovarianceModelInterface getCovarianceModel()
Returns the term structure covariance model.
DiscountCurve getDiscountCurve()
Return the discount curve associated the forwards.
RandomVariable[] getDrift(int timeIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
Return the complete vector of the drift for the time index timeIndex, given that current state is realizationAtTimeIndex.
RandomVariable[] getFactorLoading(int timeIndex, int componentIndex, RandomVariable[] realizationAtTimeIndex)
This method has to be implemented to return the factor loadings, i.e.
ForwardCurve getForwardRateCurve()
Return the initial forward rate curve.
RandomVariable[] getInitialState()
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.
RandomVariable getLIBOR(double time, double periodStart, double periodEnd)
Returns the time $$t$$ forward rate on the models forward curve.
RandomVariable getLIBOR(int timeIndex, double periodStart, double periodEnd)
RandomVariable getLIBORForStateVariable(TimeDiscretization liborPeriodDiscretization, RandomVariable[] stateVariables, double periodStart, double periodEnd)
int getNumberOfComponents()
Returns the number of components
int getNumberOfLibors()
RandomVariable getNumeraire(double time)
Return the numeraire at a given time.
RandomVariable getRandomVariableForConstant(double value)
Return a random variable initialized with a constant using the models random variable factory.
RandomVariable getStateVariable(int timeIndex, double periodStart, double periodEnd)
RandomVariable getStateVariableForPeriod(TimeDiscretization liborPeriodDiscretization, RandomVariable[] stateVariables, double periodStart, double periodEnd)
• ### Methods inherited from class net.finmath.montecarlo.model.AbstractProcessModel

getInitialValue, getMonteCarloWeights, getNumberOfFactors, getProcess, getProcessValue, getReferenceDate, getTime, getTimeDiscretization, getTimeIndex, setProcess
• ### Methods inherited from class java.lang.Object

equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Methods inherited from interface net.finmath.montecarlo.interestrate.TermStructureModel

getForwardDiscountBond
• ### Methods inherited from interface net.finmath.montecarlo.model.ProcessModel

getNumberOfFactors, getProcess, getReferenceDate, getTimeDiscretization, setProcess
• ### Constructor Detail

• #### LIBORMarketModelWithTenorRefinement

public LIBORMarketModelWithTenorRefinement(TimeDiscretization[] liborPeriodDiscretizations,
Integer[] numberOfDiscretizationIntervalls,
AnalyticModel analyticModel,
ForwardCurve forwardRateCurve,
DiscountCurve discountCurve,
TermStructureCovarianceModelInterface covarianceModel,
CalibrationProduct[] calibrationProducts,
Map<String,?> properties)
throws CalculationException
Creates a model for given covariance. Creates a discretized Heath-Jarrow-Morton model / LIBOR market model with dynamic tenor refinement, see https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2884699.
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:
• 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:
liborPeriodDiscretizations - A vector of tenor discretizations of the interest rate curve into forward rates (tenor structure), finest first.
numberOfDiscretizationIntervalls - A vector of number of periods to be taken from the liborPeriodDiscretizations.
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.
calibrationProducts - 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 RandomVariable 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 ProcessModel
Parameters:
time - Time time t for which the numeraire should be returned N(t).
Returns:
The numeraire at the specified time as RandomVariable
Throws:
CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
• #### getInitialState

public RandomVariable[] getInitialState()
Description copied from interface: ProcessModel
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 ProcessModel
Returns:
The initial value of the state variable of the process Y(t=0).
• #### getDrift

public RandomVariable[] getDrift(int timeIndex,
RandomVariable[] realizationAtTimeIndex,
RandomVariable[] realizationPredictor)
Return the complete vector of the drift for the time index timeIndex, given that current state is realizationAtTimeIndex. The drift will be zero for rates being already fixed. The method currently provides the drift for either Measure.SPOT or Measure.TERMINAL - depending how the model object was constructed. For Measure.TERMINAL the j-th entry of the return value is the random variable $\mu_{j}^{\mathbb{Q}^{P(T_{n})}}(t) \ = \ - \mathop{\sum_{l\geq j+1}}_{l\leq n-1} \frac{\delta_{l}}{1+\delta_{l} L_{l}(t)} (\lambda_{j}(t) \cdot \lambda_{l}(t))$ and for Measure.SPOT the j-th entry of the return value is the random variable $\mu_{j}^{\mathbb{Q}^{N}}(t) \ = \ \sum_{m(t) < l\leq j} \frac{\delta_{l}}{1+\delta_{l} L_{l}(t)} (\lambda_{j}(t) \cdot \lambda_{l}(t))$ where $$\lambda_{j}$$ is the vector for factor loadings for the j-th component of the stochastic process (that is, the diffusion part is $$\sum_{k=1}^m \lambda_{j,k} \mathrm{d}W_{k}$$). Note: The scalar product of the factor loadings determines the instantaneous covariance. If the model is written in log-coordinates (using exp as a state space transform), we find $$\lambda_{j} \cdot \lambda_{l} = \sum_{k=1}^m \lambda_{j,k} \lambda_{l,k} = \sigma_{j} \sigma_{l} \rho_{j,l}$$. If the model is written without a state space transformation (in its orignial coordinates) then $$\lambda_{j} \cdot \lambda_{l} = \sum_{k=1}^m \lambda_{j,k} \lambda_{l,k} = L_{j} L_{l} \sigma_{j} \sigma_{l} \rho_{j,l}$$.
Specified by:
getDrift in interface ProcessModel
Parameters:
timeIndex - Time index i for which the drift should be returned μ(ti).
realizationAtTimeIndex - Time current forward rate vector at time index i which should be used in the calculation.
realizationPredictor - The given realization at timeIndex+1 or null if no predictor is available.
Returns:
The drift vector μ(ti) as RandomVariableFromDoubleArray[]
See Also:
The calculation of the drift is consistent with the calculation of the numeraire in getNumeraire., The factor loading $$\lambda_{j,k}$$.
• #### getFactorLoading

public RandomVariable[] getFactorLoading(int timeIndex,
int componentIndex,
RandomVariable[] realizationAtTimeIndex)
Description copied from interface: ProcessModel
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 ProcessModel
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.
• #### applyStateSpaceTransform

public RandomVariable applyStateSpaceTransform(int componentIndex,
RandomVariable randomVariable)
Description copied from interface: ProcessModel
Applies the state space transform fi to the given state random variable such that Yi → fi(Yi) =: Xi.
Specified by:
applyStateSpaceTransform in interface ProcessModel
Parameters:
componentIndex - The component index i.
randomVariable - The state random variable Yi.
Returns:
New random variable holding the result of the state space transformation.
• #### applyStateSpaceTransformInverse

public RandomVariable applyStateSpaceTransformInverse(int componentIndex,
RandomVariable randomVariable)
Specified by:
applyStateSpaceTransformInverse in interface ProcessModel
• #### getRandomVariableForConstant

public RandomVariable getRandomVariableForConstant(double value)
Description copied from interface: ProcessModel
Return a random variable initialized with a constant using the models random variable factory.
Specified by:
getRandomVariableForConstant in interface ProcessModel
Parameters:
value - The constant value.
Returns:
A new random variable initialized with a constant value.
• #### getStateVariableForPeriod

public RandomVariable getStateVariableForPeriod(TimeDiscretization liborPeriodDiscretization,
RandomVariable[] stateVariables,
double periodStart,
double periodEnd)
• #### getLIBORForStateVariable

public RandomVariable getLIBORForStateVariable(TimeDiscretization liborPeriodDiscretization,
RandomVariable[] stateVariables,
double periodStart,
double periodEnd)
• #### getStateVariable

public RandomVariable getStateVariable(int timeIndex,
double periodStart,
double periodEnd)
• #### getLIBOR

public RandomVariable getLIBOR(double time,
double periodStart,
double periodEnd)
Description copied from interface: TermStructureModel
Returns the time $$t$$ forward rate on the models forward curve. Note: It is guaranteed that the random variable returned by this method is $$\mathcal{F}_{t} )$$-measurable.
Specified by:
getLIBOR in interface TermStructureModel
Parameters:
time - The evaluation time.
periodStart - The period start of the forward rate.
periodEnd - The period end of the forward rate.
Returns:
The forward rate.
• #### getLIBOR

public RandomVariable getLIBOR(int timeIndex,
double periodStart,
double periodEnd)
• #### getNumberOfComponents

public int getNumberOfComponents()
Description copied from interface: ProcessModel
Returns the number of components
Specified by:
getNumberOfComponents in interface ProcessModel
Returns:
The number of components
• #### getNumberOfLibors

public int getNumberOfLibors()
• #### clone

public Object clone()
Overrides:
clone in class Object
• #### getAnalyticModel

public AnalyticModel getAnalyticModel()
Description copied from interface: TermStructureModel
Return the associated analytic model, a collection of market date object like discount curve, forward curve and volatility surfaces.
Specified by:
getAnalyticModel in interface TermStructureModel
Returns:
The associated analytic model.
• #### getDiscountCurve

public DiscountCurve getDiscountCurve()
Description copied from interface: TermStructureModel
Return the discount curve associated the forwards.
Specified by:
getDiscountCurve in interface TermStructureModel
Returns:
the discount curve associated the forwards.
• #### getForwardRateCurve

public ForwardCurve getForwardRateCurve()
Description copied from interface: TermStructureModel
Return the initial forward rate curve.
Specified by:
getForwardRateCurve in interface TermStructureModel
Returns:
the forward rate curve
• #### getCloneWithModifiedData

public TermStructureModel getCloneWithModifiedData(Map<String,Object> dataModified)
throws CalculationException
Description copied from interface: TermStructureModel
Create a new object implementing TermStructureModel, using the new data.
Specified by:
getCloneWithModifiedData in interface TermStructureModel
Specified by:
getCloneWithModifiedData in interface ProcessModel
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 TermStructureModel, using the new data.
Throws:
CalculationException - Thrown when the model could not be created.
• #### getCovarianceModel

public TermStructureCovarianceModelInterface getCovarianceModel()
Returns the term structure covariance model.
Returns:
the term structure covariance model.
Skip navigation links
Copyright © 2018 Christian P. Fries.

Copyright © 2019. All rights reserved.