Documentation of 'net.finmath.montecarlo.templatemethoddesign.LogNormalProcess' Java class
LogNormalProcess
net.finmath.montecarlo.templatemethoddesign

Class LogNormalProcess

  • Direct Known Subclasses:
    MonteCarloBlackScholesModel2


    public abstract class LogNormalProcess
    extends java.lang.Object
    This class is an abstract base class to implement an Euler scheme of a multi-dimensional multi-factor log-normal Ito process. The dimension is called numberOfComponents here. The default for numberOfFactors is 1.
    • Constructor Detail

      • LogNormalProcess

        public LogNormalProcess(int numberOfComponents,
                                BrownianMotionInterface brownianMotion)
        Create a log normal process.
        Parameters:
        numberOfComponents - The number of components (scalar processes).
        brownianMotion - A Brownian motion
      • LogNormalProcess

        public LogNormalProcess(TimeDiscretizationInterface timeDiscretization,
                                int numberOfComponents,
                                int numberOfPaths)
        Create a simulation of log normal process.
        Parameters:
        timeDiscretization - The time discretization of the process.
        numberOfComponents - The number of components (the dimension of the process).
        numberOfPaths - The number of path of the simulation.
      • LogNormalProcess

        public LogNormalProcess(TimeDiscretizationInterface timeDiscretization,
                                int numberOfComponents,
                                int numberOfFactors,
                                int numberOfPaths,
                                int seed)
        Create a simulation of log normal process.
        Parameters:
        timeDiscretization - The time discretization of the process.
        numberOfComponents - The number of components (the dimension of the process).
        numberOfFactors - The number of factors of the process.
        numberOfPaths - The number of path of the simulation.
        seed - The seed of the underlying random number generator.
    • Method Detail

      • getDrift

        public RandomVariableInterface[] getDrift(int timeIndex,
                                                  RandomVariableInterface[] realizationAtTimeIndex,
                                                  RandomVariableInterface[] realizationPredictor)
        Get the the drift.
        Parameters:
        timeIndex - The time index (related to the model times discretization).
        realizationAtTimeIndex - The given realization at timeIndex
        realizationPredictor - The given realization at timeIndex+1 or null of no predictor is available.
        Returns:
        The (average) drift from timeIndex to timeIndex+1
      • getFactorLoading

        public abstract RandomVariableInterface getFactorLoading(int timeIndex,
                                                                 int factor,
                                                                 int component,
                                                                 RandomVariableInterface[] realizationAtTimeIndex)
        This method should be overwritten and return the factor loading, i.e. the coeffient λ(i,j) such that
        dS(j) = (...) dt + S(j) * (λ(1,j) dW(1) + ... + λ(m,j) dW(m))
        in an m-factor model. Here j denotes index of the component of the resulting log-normal process and i denotes the index of the factor.

        Overwrite this method if you would like to implement a multi factor model.

        Parameters:
        timeIndex - The time index of the simulation time discretization.
        factor - The factor index.
        component - The component index.
        realizationAtTimeIndex - The realization at the current time index.
        Returns:
        factor loading for given factor and component
      • getProcessValue

        public RandomVariableInterface[] getProcessValue(int timeIndex)
        This method returns the realization of the process at a certain time index.
        Parameters:
        timeIndex - Time index at which the process should be observed
        Returns:
        A vector of process realizations (on path)
      • 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 observed
        componentIndex - Component of the process vector
        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 which sums up to one
      • getNumberOfComponents

        public int getNumberOfComponents()
        Returns:
        Returns the numberOfComponents.
      • getNumberOfPaths

        public int getNumberOfPaths()
        Returns:
        Returns the numberOfPaths.
      • getNumberOfFactors

        public int getNumberOfFactors()
        Returns:
        Returns the numberOfFactors.
      • getTime

        public double getTime(int timeIndex)
        Returns the time for a given simulation time index.
        Parameters:
        timeIndex - Time index
        Returns:
        Returns the time for a given time index.
      • getTimeIndex

        public int getTimeIndex(double time)
        Returns the time index for a given simulation time.
        Parameters:
        time - A simulation time
        Returns:
        Returns the time index for a given time.
      • getBrownianMotion

        public BrownianMotionInterface getBrownianMotion()
        Returns:
        Returns the Brownian motion used in the generation of the process

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.