public class HullWhiteModelWithConstantCoeff extends AbstractModel implements LIBORModelInterface
HullWhiteModel.
For details and documentation please see HullWhiteModel for real applications.
| Constructor and Description |
|---|
HullWhiteModelWithConstantCoeff(TimeDiscretizationInterface liborPeriodDiscretization,
AnalyticModelInterface analyticModel,
ForwardCurveInterface forwardRateCurve,
DiscountCurveInterface discountCurve,
double meanReversion,
double volatility,
Map<String,?> properties)
Creates a Hull-White model which implements
LIBORMarketModelInterface. |
| Modifier and Type | Method and Description |
|---|---|
RandomVariableInterface |
applyStateSpaceTransform(int componentIndex,
RandomVariableInterface randomVariable)
Applied the state space transform fi to the given state random variable
such that Yi → fi(Yi) =: Xi.
|
AnalyticModelInterface |
getAnalyticModel()
Return the associated analytic model, a collection of market date object like discount curve, forward curve
and volatility surfaces.
|
LIBORMarketModelInterface |
getCloneWithModifiedData(Map<String,Object> dataModified)
Create a new object implementing LIBORModelInterface, using the new data.
|
DiscountCurveInterface |
getDiscountCurve()
Return the discount curve associated the forwards.
|
RandomVariableInterface[] |
getDrift(int timeIndex,
RandomVariableInterface[] realizationAtTimeIndex,
RandomVariableInterface[] realizationPredictor)
This method has to be implemented to return the drift, i.e.
|
RandomVariableInterface[] |
getFactorLoading(int timeIndex,
int componentIndex,
RandomVariableInterface[] realizationAtTimeIndex)
This method has to be implemented to return the factor loadings, i.e.
|
ForwardCurveInterface |
getForwardRateCurve()
Return the initial forward rate curve.
|
RandomVariableInterface[] |
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.
|
double |
getIntegratedBondSquaredVolatility(double time,
double maturity) |
RandomVariableInterface |
getLIBOR(double time,
double periodStart,
double periodEnd) |
RandomVariableInterface |
getLIBOR(int timeIndex,
int liborIndex) |
double |
getLiborPeriod(int timeIndex)
The period start corresponding to a given forward rate discretization index.
|
TimeDiscretizationInterface |
getLiborPeriodDiscretization()
The tenor time discretization of the forward rate curve.
|
int |
getLiborPeriodIndex(double time)
Same as java.util.Arrays.binarySearch(liborPeriodDiscretization,time).
|
int |
getNumberOfComponents()
Returns the number of components
|
int |
getNumberOfLibors()
Get the number of LIBORs in the LIBOR discretization.
|
RandomVariableInterface |
getNumeraire(double time)
Return the numeraire at a given time index.
|
RandomVariableInterface |
getRandomVariableForConstant(double value)
Return a random variable initialized with a constant using the models random variable factory.
|
double |
getShortRateConditionalVariance(double time,
double maturity)
Calculates the variance \( \mathop{Var}(r(t) \vert r(s) ) \), that is
\(
\int_{s}^{t} \sigma^{2}(\tau) \exp(-2 \cdot a \cdot (t-\tau)) \ \mathrm{d}\tau
\) where \( a \) is the meanReversion and \( \sigma \) is the short rate instantaneous volatility.
|
getInitialValue, getMonteCarloWeights, getNumberOfFactors, getProcess, getProcessValue, getTime, getTimeDiscretization, getTimeIndex, setProcessclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfFactors, getProcess, getTimeDiscretization, setProcesspublic HullWhiteModelWithConstantCoeff(TimeDiscretizationInterface liborPeriodDiscretization, AnalyticModelInterface analyticModel, ForwardCurveInterface forwardRateCurve, DiscountCurveInterface discountCurve, double meanReversion, double volatility, Map<String,?> properties)
LIBORMarketModelInterface.liborPeriodDiscretization - The forward rate discretization to be used in the getLIBOR method.analyticModel - The analytic model to be used (currently not used, may be null).forwardRateCurve - The forward curve to be used (currently not used, - the model uses disocuntCurve only.discountCurve - The disocuntCurve (currently also used to determine the forward curve).meanReversion - The mean reversion speed parameter a.volatility - The short rate volatility \( \sigma \).properties - A map specifying model properties (currently not used, may be null).public int getNumberOfComponents()
AbstractModelInterfacegetNumberOfComponents in interface AbstractModelInterfacepublic RandomVariableInterface applyStateSpaceTransform(int componentIndex, RandomVariableInterface randomVariable)
AbstractModelInterfaceapplyStateSpaceTransform in interface AbstractModelInterfacecomponentIndex - The component index i.randomVariable - The state random variable Yi.public RandomVariableInterface[] getInitialState()
AbstractModelInterfacegetInitialState in interface AbstractModelInterfacepublic RandomVariableInterface getNumeraire(double time) throws CalculationException
AbstractModelInterfacegetNumeraire in interface AbstractModelInterfacetime - The time t for which the numeraire N(t) should be returned.RandomVariableCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface[] getDrift(int timeIndex, RandomVariableInterface[] realizationAtTimeIndex, RandomVariableInterface[] realizationPredictor)
AbstractModelInterfacegetDrift in interface AbstractModelInterfacetimeIndex - The time index (related to the model times discretization).realizationAtTimeIndex - The given realization at timeIndexrealizationPredictor - The given realization at timeIndex+1 or null if no predictor is available.public RandomVariableInterface getRandomVariableForConstant(double value)
AbstractModelInterfacegetRandomVariableForConstant in interface AbstractModelInterfacevalue - The constant value.public RandomVariableInterface[] getFactorLoading(int timeIndex, int componentIndex, RandomVariableInterface[] realizationAtTimeIndex)
AbstractModelInterfacegetFactorLoading in interface AbstractModelInterfacetimeIndex - 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 RandomVariableInterface getLIBOR(double time, double periodStart, double periodEnd) throws CalculationException
getLIBOR in interface TermStructureModelInterfaceCalculationExceptionpublic RandomVariableInterface getLIBOR(int timeIndex, int liborIndex) throws CalculationException
getLIBOR in interface LIBORModelInterfaceCalculationExceptionpublic TimeDiscretizationInterface getLiborPeriodDiscretization()
LIBORModelInterfacegetLiborPeriodDiscretization in interface LIBORModelInterfacepublic int getNumberOfLibors()
LIBORModelInterfacegetNumberOfLibors in interface LIBORModelInterfacepublic double getLiborPeriod(int timeIndex)
LIBORModelInterfacegetLiborPeriod in interface LIBORModelInterfacetimeIndex - The index corresponding to a given time (interpretation is start of period)public int getLiborPeriodIndex(double time)
LIBORModelInterfacegetLiborPeriodIndex in interface LIBORModelInterfacetime - The period start.public AnalyticModelInterface getAnalyticModel()
TermStructureModelInterfacegetAnalyticModel in interface TermStructureModelInterfacepublic DiscountCurveInterface getDiscountCurve()
TermStructureModelInterfacegetDiscountCurve in interface TermStructureModelInterfacepublic ForwardCurveInterface getForwardRateCurve()
TermStructureModelInterfacegetForwardRateCurve in interface TermStructureModelInterfacepublic LIBORMarketModelInterface getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationException
LIBORModelInterfacegetCloneWithModifiedData in interface LIBORModelInterfacegetCloneWithModifiedData in interface TermStructureModelInterfacegetCloneWithModifiedData in interface AbstractModelInterfacedataModified - 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 double getShortRateConditionalVariance(double time,
double maturity)
time - The parameter s in \( \int_{s}^{t} \sigma^{2}(\tau) \exp(-2 \cdot a \cdot (t-\tau)) \ \mathrm{d}\tau \)maturity - The parameter t in \( \int_{s}^{t} \sigma^{2}(\tau) \exp(-2 \cdot a \cdot (t-\tau)) \ \mathrm{d}\tau \)public double getIntegratedBondSquaredVolatility(double time,
double maturity)
Copyright © 2017. All rights reserved.