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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.finmath.montecarlo.templatemethoddesign.LogNormalProcess
LogNormalProcess.Scheme
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLIBORMarketModel(TimeDiscretization liborPeriodDiscretization2, BrownianMotionLazyInit brownianMotionLazyInit)
-
Method Summary
Modifier and TypeMethodDescriptionabstract Object
getCloneWithModifiedSeed(int seed)
Return a clone of this model with a modified Brownian motion using a different seed.getForwardRate(double time, double periodStart, double periodEnd)
Return the forward rate for a given simulation time and a given period start and period end.getLIBOR(int timeIndex, int liborIndex)
Return the forward rate for a given simulation time index and a given forward rate index.double
getLiborPeriod(int timeIndex)
Returns the period start of the specified forward rate period.Returns the libor period discretization as time discretization representing start and end dates of periods.int
getLiborPeriodIndex(double time)
Same as java.util.Arrays.binarySearch(liborPeriodDiscretization,time).getLIBORs(int timeIndex)
This method returns the vector of LIBORs at a certain time index.getMonteCarloWeights(double time)
This method returns the weights of a weighted Monte Carlo method (the probability density).int
getNumeraire(double time)
Return the numeraire at a given time.abstract RandomVariable
getNumeraire(int timeIndex)
Returns the model's date corresponding to the time discretization's \( t = 0 \).Methods inherited from class net.finmath.montecarlo.templatemethoddesign.LogNormalProcess
getBrownianMotion, getDrift, getDrift, getFactorLoading, getInitialValue, getMonteCarloWeights, getNumberOfComponents, getNumberOfFactors, getNumberOfPaths, getProcessValue, getProcessValue, getScheme, getTime, getTimeDiscretization, getTimeIndex, setBrownianMotion, setScheme
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.finmath.montecarlo.automaticdifferentiation.IndependentModelParameterProvider
getModelParameters
Methods inherited from interface net.finmath.montecarlo.MonteCarloSimulationModel
getCloneWithModifiedData, getMonteCarloWeights, getNumberOfPaths, getRandomVariableForConstant, getTime, getTimeDiscretization, getTimeIndex
Methods inherited from interface net.finmath.montecarlo.interestrate.TermStructureMonteCarloSimulationModel
getBrownianMotion, getForwardRate, getLIBOR, getLIBOR, getModel, getNumberOfFactors, getNumeraire, getProcess
-
Constructor Details
-
AbstractLIBORMarketModel
public AbstractLIBORMarketModel(TimeDiscretization liborPeriodDiscretization2, BrownianMotionLazyInit brownianMotionLazyInit)- Parameters:
liborPeriodDiscretization2
- The tenorbrownianMotionLazyInit
- The Brownian motion (includes the specification of time discretization, number of factors, and number of paths.
-
-
Method Details
-
getReferenceDate
Description copied from interface:MonteCarloSimulationModel
Returns the model's date corresponding to the time discretization's \( t = 0 \).- Specified by:
getReferenceDate
in interfaceMonteCarloSimulationModel
- Returns:
- The model's date corresponding to the time discretization's \( t = 0 \).
-
getCloneWithModifiedSeed
Description copied from interface:TermStructureMonteCarloSimulationModel
Return a clone of this model with a modified Brownian motion using a different seed.- Specified by:
getCloneWithModifiedSeed
in interfaceTermStructureMonteCarloSimulationModel
- Parameters:
seed
- The seed- Returns:
- Clone of this object, but having a different seed.
-
getNumeraire
- Parameters:
timeIndex
- The time index at which the numeraire is requested.- Returns:
- The numeraire at the specified time as
RandomVariableFromDoubleArray
-
getNumeraire
Description copied from interface:TermStructureMonteCarloSimulationModel
Return the numeraire at a given time.- Specified by:
getNumeraire
in interfaceTermStructureMonteCarloSimulationModel
- Parameters:
time
- The time at which the numeraire is requested.- Returns:
- The numeraire at the specified time as
RandomVariableFromDoubleArray
-
getLIBOR
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 interfaceLIBORModelMonteCarloSimulationModel
- 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
This method returns the vector of LIBORs at a certain time index.- Specified by:
getLIBORs
in interfaceLIBORModelMonteCarloSimulationModel
- Parameters:
timeIndex
- Time index at which the process should be observed- Returns:
- The process realizations
-
getForwardRate
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 interfaceTermStructureMonteCarloSimulationModel
- Parameters:
time
- Simulation timeperiodStart
- Start time of periodperiodEnd
- End time of period- Returns:
- The LIBOR rate as seen on simulation time for the specified period
-
getMonteCarloWeights
Description copied from interface:MonteCarloSimulationModel
This method returns the weights of a weighted Monte Carlo method (the probability density).- Specified by:
getMonteCarloWeights
in interfaceMonteCarloSimulationModel
- 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 interfaceLIBORModelMonteCarloSimulationModel
- 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 interfaceLIBORModelMonteCarloSimulationModel
- 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 interfaceLIBORModelMonteCarloSimulationModel
- 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
Description copied from interface:LIBORModelMonteCarloSimulationModel
Returns the libor period discretization as time discretization representing start and end dates of periods.- Specified by:
getLiborPeriodDiscretization
in interfaceLIBORModelMonteCarloSimulationModel
- Returns:
- Returns the libor period discretization
-