net.finmath.montecarlo.process
Class ProcessEulerScheme
- java.lang.Object
-
- net.finmath.montecarlo.process.AbstractProcess
-
- net.finmath.montecarlo.process.ProcessEulerScheme
-
- All Implemented Interfaces:
- java.lang.Cloneable, AbstractProcessInterface, ProcessInterface
public class ProcessEulerScheme extends AbstractProcess
This class implements some numerical schemes for multi-dimensional multi-factor Ito process. It features the standard Euler scheme and the standard predictor-corrector Euler scheme for Y, then applies the state space transform \( X = f(Y) \). For the standard Euler scheme the process Y is discretized as \[ Y(t_{i+1}) = Y(t_{i}) + \mu(t_{i}) \Delta t_{i} + \sigma(t_{i}) \Delta W(t_{i}) \text{.} \] Hence, using the state space transform, it is possible to create a log-Eurler scheme, i.e., \[ X(t_{i+1}) = X(t_{i}) \cdot \exp\left( (\mu(t_{i}) - \frac{1}{2} sigma(t_{i})^2) \Delta t_{i} + \sigma(t_{i}) \Delta W(t_{i}) \right) \text{.} \] The dimension is callednumberOfComponentshere. The default fornumberOfFactorsis 1.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classProcessEulerScheme.Scheme
-
Constructor Summary
Constructors Constructor and Description ProcessEulerScheme(BrownianMotionInterface brownianMotion)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description ProcessEulerSchemeclone()Create and return a clone of this process.BrownianMotionInterfacegetBrownianMotion()java.lang.ObjectgetCloneWithModifiedSeed(int seed)RandomVariableInterfacegetMonteCarloWeights(int timeIndex)This method returns the weights of a weighted Monte Carlo method (the probability density).intgetNumberOfFactors()intgetNumberOfPaths()RandomVariableInterfacegetProcessValue(int timeIndex, int componentIndex)This method returns the realization of the process at a certain time index.ProcessEulerScheme.SchemegetScheme()voidsetBrownianMotion(BrownianMotion brownianMotion)Deprecated.Do not use anymore. Processes should be immutable.voidsetScheme(ProcessEulerScheme.Scheme scheme)Deprecated.Do not use anymore. Processes should be immutable.voidsetSeed(int seed)Deprecated.The class will soon be changed to be immutable-
Methods inherited from class net.finmath.montecarlo.process.AbstractProcess
applyStateSpaceTransform, getDrift, getFactorLoading, getInitialState, getNumberOfComponents, getTime, getTimeDiscretization, getTimeIndex, setModel
-
-
-
-
Constructor Detail
-
ProcessEulerScheme
public ProcessEulerScheme(BrownianMotionInterface brownianMotion)
- Parameters:
brownianMotion- The Brownian driver of the process
-
-
Method Detail
-
getProcessValue
public RandomVariableInterface getProcessValue(int timeIndex, int componentIndex)
This method returns the realization of the process at a certain time index.- Parameters:
timeIndex- Time index at which the process should be observedcomponentIndex- Component index of the process- Returns:
- A vector of process realizations (on path)
-
getMonteCarloWeights
public RandomVariableInterface getMonteCarloWeights(int timeIndex)
This method returns the weights of a weighted Monte Carlo method (the probability density).- Parameters:
timeIndex- Time index at which the process should be observed- Returns:
- A vector of positive weights
-
getNumberOfPaths
public int getNumberOfPaths()
- Returns:
- Returns the numberOfPaths.
-
getNumberOfFactors
public int getNumberOfFactors()
- Returns:
- Returns the numberOfFactors.
-
setSeed
@Deprecated public void setSeed(int seed)
Deprecated. The class will soon be changed to be immutable- Parameters:
seed- The seed to set.
-
getBrownianMotion
public BrownianMotionInterface getBrownianMotion()
- Returns:
- Returns the Brownian motion used in the generation of the process
-
setBrownianMotion
@Deprecated public void setBrownianMotion(BrownianMotion brownianMotion)
Deprecated. Do not use anymore. Processes should be immutable.- Parameters:
brownianMotion- The brownianMotion to set.
-
getScheme
public ProcessEulerScheme.Scheme getScheme()
- Returns:
- Returns the scheme.
-
setScheme
@Deprecated public void setScheme(ProcessEulerScheme.Scheme scheme)
Deprecated. Do not use anymore. Processes should be immutable.- Parameters:
scheme- The scheme to set.
-
clone
public ProcessEulerScheme clone()
Description copied from interface:AbstractProcessInterfaceCreate and return a clone of this process. The clone is not tied to any model, but has the same process specification, that is, if the model is the same, it would generate the same paths.- Specified by:
clonein interfaceAbstractProcessInterface- Specified by:
clonein interfaceProcessInterface- Specified by:
clonein classAbstractProcess- Returns:
- Clone of the process
-
getCloneWithModifiedSeed
public java.lang.Object getCloneWithModifiedSeed(int seed)
- Specified by:
getCloneWithModifiedSeedin classAbstractProcess
-
-
DataMelt 3.0 © DataMelt by jWork.ORG