Class SimpleLIBORMarketModel

All Implemented Interfaces:
Model, IndependentModelParameterProvider, LIBORModelMonteCarloSimulationModel, TermStructureMonteCarloSimulationModel, MonteCarloSimulationModel
Direct Known Subclasses:
SimpleLIBORMarketModelWithWMC

public class SimpleLIBORMarketModel extends AbstractLIBORMarketModel
Implements a basic LIBOR market model with a some drift approximation methods.
Since:
finmath-lib 4.1.0
Version:
0.5
Author:
Christian Fries
  • Constructor Details

    • SimpleLIBORMarketModel

      public SimpleLIBORMarketModel(TimeDiscretization timeDiscretizationFromArray, TimeDiscretization liborPeriodDiscretization, int numberOfPaths, double[] liborInitialValues, LIBORCovarianceModel covarianceModel)
      Creates a LIBOR Market Model for given covariance.
      Parameters:
      timeDiscretizationFromArray - The time discretization of the process (simulation time).
      liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
      numberOfPaths - The number of paths.
      liborInitialValues - The initial values for the forward rates.
      covarianceModel - The covariance model to use.
    • SimpleLIBORMarketModel

      public SimpleLIBORMarketModel(TimeDiscretization liborPeriodDiscretization, double[] liborInitialValues, LIBORCovarianceModel covarianceModel, BrownianMotionLazyInit brownianMotion)
      Creates a LIBOR Market Model for given covariance.
      Parameters:
      liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
      liborInitialValues - The initial values for the forward rates.
      covarianceModel - The covariance model to use.
      brownianMotion - The brownian driver for the Monte-Carlo simulation.
    • SimpleLIBORMarketModel

      public SimpleLIBORMarketModel(TimeDiscretization timeDiscretizationFromArray, TimeDiscretization liborPeriodDiscretization, int numberOfPaths, double[] liborInitialValues, LIBORVolatilityModel volatilityModel, LIBORCorrelationModel correlationModel)
      Creates a LIBOR Market Model for given volatility and correlation model.
      Parameters:
      timeDiscretizationFromArray - The time discretization of the process (simulation time).
      liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
      numberOfPaths - The number of paths.
      liborInitialValues - The initial values for the forward rates.
      volatilityModel - The volatility model to use.
      correlationModel - The correlation model to use.
    • SimpleLIBORMarketModel

      public SimpleLIBORMarketModel(TimeDiscretization timeDiscretizationFromArray, TimeDiscretization liborPeriodDiscretization, int numberOfPaths, double[] liborInitialValues, LIBORVolatilityModel volatilityModel)
      Creates a one factor LIBOR Market Model (correlation = 1).
      Parameters:
      timeDiscretizationFromArray - The time discretization of the process (simulation time).
      liborPeriodDiscretization - The discretization of the interest rate curve into forward rates (tenor structure).
      numberOfPaths - The number of paths.
      liborInitialValues - The initial values for the forward rates.
      volatilityModel - The volatility model to use.
  • Method Details

    • getInitialValue

      public RandomVariable[] getInitialValue()
      Specified by:
      getInitialValue in class LogNormalProcess
    • getInitialValue

      public RandomVariableFromDoubleArray getInitialValue(int componentIndex)
    • getFactorLoading

      public RandomVariable getFactorLoading(int timeIndex, int factor, int component, RandomVariable[] realizationAtTimeIndex)
      Description copied from class: LogNormalProcess
      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.

      Specified by:
      getFactorLoading in class LogNormalProcess
      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
    • getDrift

      public RandomVariable[] getDrift(int timeIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
      Description copied from class: LogNormalProcess
      Get the the drift.
      Overrides:
      getDrift in class LogNormalProcess
      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
    • getDrift

      public RandomVariable getDrift(int timeIndex, int componentIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
      Specified by:
      getDrift in class LogNormalProcess
    • getDriftAproximationMethod

      public SimpleLIBORMarketModel.Driftapproximation getDriftAproximationMethod()
      Returns:
      Returns the driftAproximationMethod.
    • getLMMTerminasureDriftEuler

      protected double[] getLMMTerminasureDriftEuler(int timeIndex, int componentIndex, RandomVariable[] liborVectorStart)
    • getMeasure

      public SimpleLIBORMarketModel.Measure getMeasure()
      Returns:
      Returns the measure.
    • getNumeraire

      public RandomVariable getNumeraire(int timeIndex)
      Specified by:
      getNumeraire in class AbstractLIBORMarketModel
      Parameters:
      timeIndex - The time indes at which the numeriare is requrested.
      Returns:
      The numeraire at the specified time as RandomVariable
      To dos:
      This method does not interpolate the Numeraire if it is requested outside the liborPeriodDiscretization
    • setDriftAproximationMethod

      public void setDriftAproximationMethod(SimpleLIBORMarketModel.Driftapproximation driftAproximationMethod)
      Parameters:
      driftAproximationMethod - The driftAproximationMethod to set.
    • setMeasure

      public void setMeasure(SimpleLIBORMarketModel.Measure measure)
      Parameters:
      measure - The measure to set.
    • getCovarianceModel

      public LIBORCovarianceModel getCovarianceModel()
      Returns:
      the covarianceModel
    • setCovarianceModel

      public void setCovarianceModel(LIBORCovarianceModel covarianceModel)
      Parameters:
      covarianceModel - the covarianceModel to set
    • getCloneWithModifiedData

      public SimpleLIBORMarketModel getCloneWithModifiedData(Map<String,​Object> dataModified)
      Description copied from interface: MonteCarloSimulationModel
      Create a clone of this simulation modifying some of its properties (if any). The properties that should be modified correspond to arguments of constructors. A constructor is then called with where all arguments that are not found in the key value map are being set to this objects values.
      Parameters:
      dataModified - The data which should be changed in the new model. This is a key value may, where the key corresponds to the name of a property in one of the objects constructors.
      Returns:
      Returns a clone of this object, with some data modified (then it is no longer a clone :-)
    • getCloneWithModifiedSeed

      public Object getCloneWithModifiedSeed(int seed)
      Description copied from interface: TermStructureMonteCarloSimulationModel
      Return a clone of this model with a modified Brownian motion using a different seed.
      Specified by:
      getCloneWithModifiedSeed in interface TermStructureMonteCarloSimulationModel
      Specified by:
      getCloneWithModifiedSeed in class AbstractLIBORMarketModel
      Parameters:
      seed - The seed
      Returns:
      Clone of this object, but having a different seed.
    • getModel

      Description copied from interface: TermStructureMonteCarloSimulationModel
      Returns the underlying model. The model specifies the measure, the initial value, the drift, the factor loadings (covariance model), etc.
      Returns:
      The underlying model
    • getProcess

      public MonteCarloProcess getProcess()
      Returns:
      The implementation of the process
    • getRandomVariableForConstant

      public RandomVariable getRandomVariableForConstant(double value)
      Description copied from interface: MonteCarloSimulationModel
      Returns a random variable which is initialized to a constant, but has exactly the same number of paths or discretization points as the ones used by this MonteCarloSimulationModel.
      Parameters:
      value - The constant value to be used for initialized the random variable.
      Returns:
      A new random variable.
    • getModelParameters

      public Map<String,​RandomVariable> getModelParameters()
      Description copied from interface: IndependentModelParameterProvider
      Returns a map of independent model parameters of this model.
      Returns:
      Map of independent model parameters of this model.