Class AbstractLIBORMarketModel

java.lang.Object
net.finmath.montecarlo.templatemethoddesign.LogNormalProcess
net.finmath.montecarlo.interestrate.simple.AbstractLIBORMarketModel
All Implemented Interfaces:
Model, IndependentModelParameterProvider, LIBORModelMonteCarloSimulationModel, TermStructureMonteCarloSimulationModel, MonteCarloSimulationModel
Direct Known Subclasses:
SimpleLIBORMarketModel

public abstract class AbstractLIBORMarketModel extends LogNormalProcess implements LIBORModelMonteCarloSimulationModel
This class represents an abstract base class for a LIBOR Market Model. Derive from this class and implement initial value, volatility and correlation (via factor loadings).
Since:
finmath-lib 4.1.0
Version:
0.5
Author:
Christian Fries
  • Constructor Details

    • AbstractLIBORMarketModel

      public AbstractLIBORMarketModel(TimeDiscretization liborPeriodDiscretization2, BrownianMotionLazyInit brownianMotionLazyInit)
      Parameters:
      liborPeriodDiscretization2 - The tenor
      brownianMotionLazyInit - The Brownian motion (includes the specification of time discretization, number of factors, and number of paths.
  • Method Details

    • getReferenceDate

      public LocalDateTime getReferenceDate()
      Description copied from interface: MonteCarloSimulationModel
      Returns the model's date corresponding to the time discretization's \( t = 0 \).
      Specified by:
      getReferenceDate in interface MonteCarloSimulationModel
      Returns:
      The model's date corresponding to the time discretization's \( t = 0 \).
    • getCloneWithModifiedSeed

      public abstract 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
      Parameters:
      seed - The seed
      Returns:
      Clone of this object, but having a different seed.
    • getNumeraire

      public abstract RandomVariable getNumeraire(int timeIndex)
      Parameters:
      timeIndex - The time index at which the numeraire is requested.
      Returns:
      The numeraire at the specified time as RandomVariableFromDoubleArray
    • getNumeraire

      public RandomVariable getNumeraire(double time)
      Description copied from interface: TermStructureMonteCarloSimulationModel
      Return the numeraire at a given time.
      Specified by:
      getNumeraire in interface TermStructureMonteCarloSimulationModel
      Parameters:
      time - The time at which the numeraire is requested.
      Returns:
      The numeraire at the specified time as RandomVariableFromDoubleArray
    • getLIBOR

      public RandomVariable getLIBOR(int timeIndex, int liborIndex)
      Description copied from interface: LIBORModelMonteCarloSimulationModel
      Return the forward rate for a given simulation time index and a given forward rate index.
      Specified by:
      getLIBOR in interface LIBORModelMonteCarloSimulationModel
      Parameters:
      timeIndex - Simulation time index.
      liborIndex - TenorFromArray time index (index corresponding to the fixing of the forward rate).
      Returns:
      The forward rate as a random variable.
    • getLIBORs

      public RandomVariable[] getLIBORs(int timeIndex)
      This method returns the vector of LIBORs at a certain time index.
      Specified by:
      getLIBORs in interface LIBORModelMonteCarloSimulationModel
      Parameters:
      timeIndex - Time index at which the process should be observed
      Returns:
      The process realizations
    • getForwardRate

      public RandomVariable getForwardRate(double time, double periodStart, double periodEnd)
      Description copied from interface: TermStructureMonteCarloSimulationModel
      Return the forward rate for a given simulation time and a given period start and period end.
      Specified by:
      getForwardRate in interface TermStructureMonteCarloSimulationModel
      Parameters:
      time - Simulation time
      periodStart - Start time of period
      periodEnd - End time of period
      Returns:
      The LIBOR rate as seen on simulation time for the specified period
    • getMonteCarloWeights

      public RandomVariable getMonteCarloWeights(double time)
      Description copied from interface: MonteCarloSimulationModel
      This method returns the weights of a weighted Monte Carlo method (the probability density).
      Specified by:
      getMonteCarloWeights in interface MonteCarloSimulationModel
      Parameters:
      time - Time at which the process should be observed
      Returns:
      A vector of positive weights which sums up to one
    • getNumberOfLibors

      public int getNumberOfLibors()
      Specified by:
      getNumberOfLibors in interface LIBORModelMonteCarloSimulationModel
      Returns:
      The number of LIBORs in the LIBOR discretization
    • getLiborPeriod

      public double getLiborPeriod(int timeIndex)
      Description copied from interface: LIBORModelMonteCarloSimulationModel
      Returns the period start of the specified forward rate period.
      Specified by:
      getLiborPeriod in interface LIBORModelMonteCarloSimulationModel
      Parameters:
      timeIndex - The index corresponding to a given time (interpretation is start of period)
      Returns:
      The index corresponding to a given time (interpretation is start of period)
    • getLiborPeriodIndex

      public int getLiborPeriodIndex(double time)
      Same as java.util.Arrays.binarySearch(liborPeriodDiscretization,time). Will return a negative value if the time is not found, but then -index-1 corresponds to the index of the smallest time greater than the given one.
      Specified by:
      getLiborPeriodIndex in interface LIBORModelMonteCarloSimulationModel
      Parameters:
      time - The tenor time (fixing of the forward rate) for which the index is requested.
      Returns:
      The index corresponding to a given time (interpretation is start of period)
    • getLiborPeriodDiscretization

      public TimeDiscretization getLiborPeriodDiscretization()
      Description copied from interface: LIBORModelMonteCarloSimulationModel
      Returns the libor period discretization as time discretization representing start and end dates of periods.
      Specified by:
      getLiborPeriodDiscretization in interface LIBORModelMonteCarloSimulationModel
      Returns:
      Returns the libor period discretization