public class HybridAssetLIBORModelMonteCarloSimulation extends Object implements HybridAssetLIBORModelMonteCarloSimulationInterface
LIBORModelMonteCarloSimulationInterface providing the interest
rate simulation and the numeraire and an object implementing
AssetModelMonteCarloSimulationInterface providing the
asset simulation.
The interest rate model needs to be in spot measure.| Constructor and Description |
|---|
HybridAssetLIBORModelMonteCarloSimulation(LIBORModelMonteCarloSimulationInterface liborSimulation,
AssetModelMonteCarloSimulationInterface assetSimulation) |
HybridAssetLIBORModelMonteCarloSimulation(LIBORModelMonteCarloSimulationInterface liborSimulation,
AssetModelMonteCarloSimulationInterface assetSimulation,
DiscountCurveInterface discountCurve)
Create an Equity Hybrid LIBOR Market Model composed of an object implementing
LIBORModelMonteCarloSimulationInterface providing the interest
rate simulation and the numeraire and an object implementing
AssetModelMonteCarloSimulationInterface providing the
asset simulation. |
| Modifier and Type | Method and Description |
|---|---|
RandomVariableInterface |
getAssetValue(double time,
int assetIndex)
Returns the random variable representing the asset's value at a given time for a given asset.
|
RandomVariableInterface |
getAssetValue(int timeIndex,
int assetIndex)
Returns the random variable representing the asset's value at a given time for a given asset.
|
BrownianMotionInterface |
getBrownianMotion()
Returns the Brownian motion used to simulate the curve.
|
HybridAssetLIBORModelMonteCarloSimulation |
getCloneWithModifiedData(Map<String,Object> dataModified)
Create a clone of this simulation modifying some of its properties (if any).
|
HybridAssetLIBORModelMonteCarloSimulation |
getCloneWithModifiedSeed(int seed)
Deprecated.
|
RandomVariableInterface |
getLIBOR(double time,
double periodStart,
double periodEnd)
Return the forward rate for a given simulation time and a given period start and period end.
|
RandomVariableInterface |
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.
|
TimeDiscretizationInterface |
getLiborPeriodDiscretization()
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).
|
RandomVariableInterface[] |
getLIBORs(int timeIndex)
Return the forward rate curve for a given simulation time index.
|
TermStructureModelInterface |
getModel()
Returns the underlying model.
|
RandomVariableInterface |
getMonteCarloWeights(double time)
This method returns the weights of a weighted Monte Carlo method (the probability density).
|
RandomVariableInterface |
getMonteCarloWeights(int timeIndex)
This method returns the weights of a weighted Monte Carlo method (the probability density).
|
int |
getNumberOfAssets()
Returns the number of asset price processes.
|
int |
getNumberOfFactors() |
int |
getNumberOfLibors() |
int |
getNumberOfPaths()
Returns the numberOfPaths.
|
RandomVariableInterface |
getNumeraire(double time)
Return the numeraire at a given time.
|
RandomVariableInterface |
getNumeraire(int timeIndex)
Returns the numeraire associated with the valuation measure used by this model.
|
AbstractProcessInterface |
getProcess() |
RandomVariableInterface |
getRandomVariableForConstant(double value)
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
MonteCarloSimulationInterface. |
double |
getTime(int timeIndex)
Returns the time for a given time index.
|
TimeDiscretizationInterface |
getTimeDiscretization()
Returns the timeDiscretization.
|
int |
getTimeIndex(double time)
Returns the time index for a given time.
|
public HybridAssetLIBORModelMonteCarloSimulation(LIBORModelMonteCarloSimulationInterface liborSimulation, AssetModelMonteCarloSimulationInterface assetSimulation, DiscountCurveInterface discountCurve)
LIBORModelMonteCarloSimulationInterface providing the interest
rate simulation and the numeraire and an object implementing
AssetModelMonteCarloSimulationInterface providing the
asset simulation.
The interest rate model needs to be in spot measure.liborSimulation - An object implementing LIBORModelMonteCarloSimulationInterface providing the interest rate simulation and the numeraire.assetSimulation - An object implementing AssetModelMonteCarloSimulationInterface providing the asset simulation.discountCurve - An optional object implementing DiscountCurveInterface to adjust the numeraire for a deterministic discounting spread.public HybridAssetLIBORModelMonteCarloSimulation(LIBORModelMonteCarloSimulationInterface liborSimulation, AssetModelMonteCarloSimulationInterface assetSimulation)
public int getNumberOfPaths()
MonteCarloSimulationInterfacegetNumberOfPaths in interface MonteCarloSimulationInterfacepublic TimeDiscretizationInterface getTimeDiscretization()
MonteCarloSimulationInterfacegetTimeDiscretization in interface MonteCarloSimulationInterfacepublic int getNumberOfFactors()
getNumberOfFactors in interface LIBORModelMonteCarloSimulationInterfacepublic double getTime(int timeIndex)
MonteCarloSimulationInterfacegetTime in interface MonteCarloSimulationInterfacetimeIndex - Time indexpublic TimeDiscretizationInterface getLiborPeriodDiscretization()
LIBORModelMonteCarloSimulationInterfacegetLiborPeriodDiscretization in interface LIBORModelMonteCarloSimulationInterfacepublic int getTimeIndex(double time)
MonteCarloSimulationInterfacegetTimeIndex in interface MonteCarloSimulationInterfacetime - The time.public int getNumberOfLibors()
getNumberOfLibors in interface LIBORModelMonteCarloSimulationInterfacepublic RandomVariableInterface getRandomVariableForConstant(double value)
MonteCarloSimulationInterfaceMonteCarloSimulationInterface.getRandomVariableForConstant in interface MonteCarloSimulationInterfacevalue - The constant value to be used for initialized the random variable.public double getLiborPeriod(int timeIndex)
LIBORModelMonteCarloSimulationInterfacegetLiborPeriod in interface LIBORModelMonteCarloSimulationInterfacetimeIndex - The index corresponding to a given time (interpretation is start of period)public int getLiborPeriodIndex(double time)
LIBORModelMonteCarloSimulationInterfacegetLiborPeriodIndex in interface LIBORModelMonteCarloSimulationInterfacetime - The tenor time (fixing of the forward rate) for which the index is requested.public RandomVariableInterface getMonteCarloWeights(int timeIndex) throws CalculationException
MonteCarloSimulationInterfacegetMonteCarloWeights in interface MonteCarloSimulationInterfacetimeIndex - Time index at which the process should be observedCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface getLIBOR(int timeIndex, int liborIndex) throws CalculationException
LIBORModelMonteCarloSimulationInterfacegetLIBOR in interface LIBORModelMonteCarloSimulationInterfacetimeIndex - Simulation time index.liborIndex - Tenor time index (index corresponding to the fixing of the forward rate).CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface getMonteCarloWeights(double time) throws CalculationException
MonteCarloSimulationInterfacegetMonteCarloWeights in interface MonteCarloSimulationInterfacetime - Time at which the process should be observedCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface getLIBOR(double time, double periodStart, double periodEnd) throws CalculationException
TermStructureModelMonteCarloSimulationInterfacegetLIBOR in interface TermStructureModelMonteCarloSimulationInterfacetime - Simulation timeperiodStart - Start time of periodperiodEnd - End time of periodCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public HybridAssetLIBORModelMonteCarloSimulation getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationException
MonteCarloSimulationInterfacegetCloneWithModifiedData in interface AssetModelMonteCarloSimulationInterfacegetCloneWithModifiedData in interface MonteCarloSimulationInterfacedataModified - The data which should be changed in the new modelCalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface[] getLIBORs(int timeIndex) throws CalculationException
LIBORModelMonteCarloSimulationInterfacegetLIBORs in interface LIBORModelMonteCarloSimulationInterfacetimeIndex - Simulation time index.CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface getNumeraire(double time) throws CalculationException
TermStructureModelMonteCarloSimulationInterfacegetNumeraire in interface AssetModelMonteCarloSimulationInterfacegetNumeraire in interface TermStructureModelMonteCarloSimulationInterfacetime - Time at which the process should be observedRandomVariableCalculationException - Thrown if calculation of numeraire fails.public RandomVariableInterface getNumeraire(int timeIndex) throws CalculationException
AssetModelMonteCarloSimulationInterfacegetNumeraire in interface AssetModelMonteCarloSimulationInterfacetimeIndex - The time index (associated with this models time discretization).CalculationException - Thrown if calculation of numeraire fails.public BrownianMotionInterface getBrownianMotion()
LIBORModelMonteCarloSimulationInterfacegetBrownianMotion in interface LIBORModelMonteCarloSimulationInterfacepublic TermStructureModelInterface getModel()
LIBORModelMonteCarloSimulationInterfacegetModel in interface LIBORModelMonteCarloSimulationInterfacegetModel in interface TermStructureModelMonteCarloSimulationInterfacepublic AbstractProcessInterface getProcess()
getProcess in interface TermStructureModelMonteCarloSimulationInterfacepublic HybridAssetLIBORModelMonteCarloSimulation getCloneWithModifiedSeed(int seed)
LIBORModelMonteCarloSimulationInterfacegetCloneWithModifiedSeed in interface AssetModelMonteCarloSimulationInterfacegetCloneWithModifiedSeed in interface LIBORModelMonteCarloSimulationInterfaceseed - The seedLIBORModelMonteCarloSimulationInterface.getCloneWithModifiedSeed(int)public int getNumberOfAssets()
AssetModelMonteCarloSimulationInterfacegetNumberOfAssets in interface AssetModelMonteCarloSimulationInterfacepublic RandomVariableInterface getAssetValue(int timeIndex, int assetIndex) throws CalculationException
AssetModelMonteCarloSimulationInterfacegetAssetValue in interface AssetModelMonteCarloSimulationInterfacetimeIndex - Index of simulation timeassetIndex - Index of the asset (0 for a single asset model)CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public RandomVariableInterface getAssetValue(double time, int assetIndex) throws CalculationException
AssetModelMonteCarloSimulationInterfacegetAssetValue in interface AssetModelMonteCarloSimulationInterfacetime - Simulation timeassetIndex - Index of the asset (0 for a single asset model)CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.Copyright © 2017. All rights reserved.