public class LIBORMarketModelWithTenorRefinement extends AbstractProcessModel implements TermStructureModel
AbstractLIBORCovarianceModel for the specification of
(λ1,j,...,λm,j) as a covariance model.
See ProcessModel for details on the implemented interface
AbstractLIBORCovarianceModel as a covariance model.
If the covariance model is of type AbstractLIBORCovarianceModelParametric
a calibration to swaptions can be performed.
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 interface for numerical schemes.,
The interface for models provinding parameters to numerical schemes.,
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2884699| Modifier and Type | Class and Description |
|---|---|
static class |
LIBORMarketModelWithTenorRefinement.Driftapproximation |
| 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.
|
| 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) |
getInitialValue, getMonteCarloWeights, getNumberOfFactors, getProcess, getProcessValue, getReferenceDate, getTime, getTimeDiscretization, getTimeIndex, setProcessequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetForwardDiscountBondgetNumberOfFactors, getProcess, getReferenceDate, getTimeDiscretization, setProcesspublic LIBORMarketModelWithTenorRefinement(TimeDiscretization[] liborPeriodDiscretizations, Integer[] numberOfDiscretizationIntervalls, AnalyticModel analyticModel, ForwardCurve forwardRateCurve, DiscountCurve discountCurve, TermStructureCovarianceModelInterface covarianceModel, CalibrationProduct[] calibrationProducts, Map<String,?> properties) throws CalculationException
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.
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.CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariable getNumeraire(double time) throws CalculationException
getNumeraire in interface ProcessModeltime - Time time t for which the numeraire should be returned N(t).RandomVariableCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariable[] getInitialState()
ProcessModelgetInitialState in interface ProcessModelpublic RandomVariable[] getDrift(int timeIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
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} \).getDrift in interface ProcessModeltimeIndex - 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.RandomVariableFromDoubleArray[]The calculation of the drift is consistent with the calculation of the numeraire in getNumeraire.,
The factor loading \( \lambda_{j,k} \).public RandomVariable[] getFactorLoading(int timeIndex, int componentIndex, RandomVariable[] realizationAtTimeIndex)
ProcessModelgetFactorLoading in interface ProcessModeltimeIndex - 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).public RandomVariable applyStateSpaceTransform(int componentIndex, RandomVariable randomVariable)
ProcessModelapplyStateSpaceTransform in interface ProcessModelcomponentIndex - The component index i.randomVariable - The state random variable Yi.public RandomVariable applyStateSpaceTransformInverse(int componentIndex, RandomVariable randomVariable)
applyStateSpaceTransformInverse in interface ProcessModelpublic RandomVariable getRandomVariableForConstant(double value)
ProcessModelgetRandomVariableForConstant in interface ProcessModelvalue - The constant value.public RandomVariable getStateVariableForPeriod(TimeDiscretization liborPeriodDiscretization, RandomVariable[] stateVariables, double periodStart, double periodEnd)
public RandomVariable getLIBORForStateVariable(TimeDiscretization liborPeriodDiscretization, RandomVariable[] stateVariables, double periodStart, double periodEnd)
public RandomVariable getStateVariable(int timeIndex, double periodStart, double periodEnd)
public RandomVariable getLIBOR(double time, double periodStart, double periodEnd)
TermStructureModelgetLIBOR in interface TermStructureModeltime - The evaluation time.periodStart - The period start of the forward rate.periodEnd - The period end of the forward rate.public RandomVariable getLIBOR(int timeIndex, double periodStart, double periodEnd)
public int getNumberOfComponents()
ProcessModelgetNumberOfComponents in interface ProcessModelpublic int getNumberOfLibors()
public AnalyticModel getAnalyticModel()
TermStructureModelgetAnalyticModel in interface TermStructureModelpublic DiscountCurve getDiscountCurve()
TermStructureModelgetDiscountCurve in interface TermStructureModelpublic ForwardCurve getForwardRateCurve()
TermStructureModelgetForwardRateCurve in interface TermStructureModelpublic TermStructureModel getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationException
TermStructureModelgetCloneWithModifiedData in interface TermStructureModelgetCloneWithModifiedData in interface ProcessModeldataModified - A map with values to be used in constructions (keys are identical to parameter names of the constructors).CalculationException - Thrown when the model could not be created.public TermStructureCovarianceModelInterface getCovarianceModel()
Copyright © 2019. All rights reserved.