public class InhomogenousBachelierModel extends AbstractProcessModel
MonteCarloProcess via the specification of
\( f = \text{identity} \), \( \mu = \frac{exp(r \Delta t_{i}) - 1}{\Delta t_{i}} S(t_{i}) \), \( \lambda_{1,1} = \sigma \frac{exp(-2 r t_{i}) - exp(-2 r t_{i+1})}{2 r \Delta t_{i}} \), i.e.,
of the SDE
\[
dX = \mu dt + \lambda_{1,1} dW, \quad X(0) = \log(S_{0}),
\]
with \( S = X \). See MonteCarloProcess for the notation.
The model's implied Bachelier volatility for a given maturity T is
volatility * Math.sqrt((Math.exp(2 * riskFreeRate * optionMaturity) - 1)/(2*riskFreeRate*optionMaturity))The interface for numerical schemes.,
The interface for models provinding parameters to numerical schemes.| Constructor and Description |
|---|
InhomogenousBachelierModel(double initialValue,
double riskFreeRate,
double volatility)
Create a Monte-Carlo simulation using given time discretization.
|
| 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) |
InhomogenousBachelierModel |
getCloneWithModifiedData(Map<String,Object> dataModified)
Returns a clone of this model where the specified properties have been modified.
|
RandomVariable[] |
getDrift(int timeIndex,
RandomVariable[] realizationAtTimeIndex,
RandomVariable[] realizationPredictor)
This method has to be implemented to return the drift, i.e.
|
RandomVariable[] |
getFactorLoading(int timeIndex,
int component,
RandomVariable[] realizationAtTimeIndex)
This method has to be implemented to return the factor loadings, i.e.
|
double |
getImpliedBachelierVolatility(double maturity) |
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.
|
int |
getNumberOfComponents()
Returns the number of components
|
RandomVariable |
getNumeraire(double time)
Return the numeraire at a given time index.
|
RandomVariable |
getRandomVariableForConstant(double value)
Return a random variable initialized with a constant using the models random variable factory.
|
double |
getRiskFreeRate()
Returns the risk free rate parameter of this model.
|
double |
getVolatility()
Returns the volatility parameter of this model.
|
String |
toString() |
getInitialValue, getMonteCarloWeights, getNumberOfFactors, getProcess, getProcessValue, getReferenceDate, getTime, getTimeDiscretization, getTimeIndex, setProcesspublic InhomogenousBachelierModel(double initialValue,
double riskFreeRate,
double volatility)
initialValue - Spot value.riskFreeRate - The risk free rate.volatility - The volatility.public RandomVariable[] getInitialState()
ProcessModelpublic RandomVariable[] getDrift(int timeIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
ProcessModeltimeIndex - 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 RandomVariable[] getFactorLoading(int timeIndex, int component, RandomVariable[] realizationAtTimeIndex)
ProcessModeltimeIndex - The time index (related to the model times discretization).component - 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)
ProcessModelcomponentIndex - The component index i.randomVariable - The state random variable Yi.public RandomVariable applyStateSpaceTransformInverse(int componentIndex, RandomVariable randomVariable)
public RandomVariable getNumeraire(double time)
ProcessModeltime - The time t for which the numeraire N(t) should be returned.RandomVariableFromDoubleArraypublic int getNumberOfComponents()
ProcessModelpublic RandomVariable getRandomVariableForConstant(double value)
ProcessModelvalue - The constant value.public InhomogenousBachelierModel getCloneWithModifiedData(Map<String,Object> dataModified)
ProcessModeldataModified. If data is provided which is ignored by the model
no exception may be thrown.dataModified - Key-value-map of parameters to modify.public double getRiskFreeRate()
public double getVolatility()
public double getImpliedBachelierVolatility(double maturity)
Copyright © 2019. All rights reserved.