public class MonteCarloBlackScholesModel2 extends LogNormalProcess implements AssetModelMonteCarloSimulationInterface
LogNormalProcess.Scheme| Constructor and Description |
|---|
MonteCarloBlackScholesModel2(TimeDiscretizationInterface timeDiscretization,
int numberOfPaths,
double initialValue,
double riskFreeRate,
double volatility)
Create a Monte-Carlo simulation using given time discretization.
|
MonteCarloBlackScholesModel2(TimeDiscretizationInterface timeDiscretization,
int numberOfPaths,
double initialValue,
double riskFreeRate,
double volatility,
int seed)
Create a Monte-Carlo simulation using given time discretization.
|
| 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.
|
AssetModelMonteCarloSimulationInterface |
getCloneWithModifiedData(Map<String,Object> dataModified)
Create a clone of this simulation modifying some of its properties (if any).
|
AssetModelMonteCarloSimulationInterface |
getCloneWithModifiedSeed(int seed)
Create a clone of the object implementing
AssetModelMonteCarloSimulationInterface
using a different Monte-Carlo seed. |
RandomVariableInterface |
getDrift(int timeIndex,
int componentIndex,
RandomVariableInterface[] realizationAtTimeIndex,
RandomVariableInterface[] realizationPredictor) |
RandomVariableInterface |
getFactorLoading(int timeIndex,
int factor,
int component,
RandomVariableInterface[] realizationAtTimeIndex)
This method should be overwritten and return the factor loading, i.e.
|
RandomVariableInterface[] |
getInitialValue() |
RandomVariableInterface |
getMonteCarloWeights(double time)
This method returns the weights of a weighted Monte Carlo method (the probability density).
|
int |
getNumberOfAssets()
Returns the number of asset price processes.
|
RandomVariableInterface |
getNumeraire(double time)
Returns the numeraire associated with the valuation measure used by this model.
|
RandomVariableInterface |
getNumeraire(int timeIndex)
Returns the numeraire associated with the valuation measure used by this model.
|
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 |
getRiskFreeRate()
Returns the riskFreeRate.
|
double |
getVolatility()
Returns the volatility.
|
String |
toString() |
getBrownianMotion, getDrift, getMonteCarloWeights, getNumberOfComponents, getNumberOfFactors, getNumberOfPaths, getProcessValue, getProcessValue, getScheme, getTime, getTimeDiscretization, getTimeIndex, setBrownianMotion, setSchemeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMonteCarloWeights, getNumberOfPaths, getTime, getTimeDiscretization, getTimeIndexpublic MonteCarloBlackScholesModel2(TimeDiscretizationInterface timeDiscretization, int numberOfPaths, double initialValue, double riskFreeRate, double volatility)
timeDiscretization - The time discretizationnumberOfPaths - The number of Monte-Carlo path to be usedinitialValue - Spot valueriskFreeRate - The risk free ratevolatility - The log volatilitypublic MonteCarloBlackScholesModel2(TimeDiscretizationInterface timeDiscretization, int numberOfPaths, double initialValue, double riskFreeRate, double volatility, int seed)
timeDiscretization - The time discretization.numberOfPaths - The number of Monte-Carlo path to be used.initialValue - Spot value.riskFreeRate - The risk free rate.volatility - The log volatility.seed - The seed for the random number generator.public int getNumberOfAssets()
AssetModelMonteCarloSimulationInterfacegetNumberOfAssets in interface AssetModelMonteCarloSimulationInterfacepublic RandomVariableInterface[] getInitialValue()
getInitialValue in class LogNormalProcesspublic RandomVariableInterface getDrift(int timeIndex, int componentIndex, RandomVariableInterface[] realizationAtTimeIndex, RandomVariableInterface[] realizationPredictor)
getDrift in class LogNormalProcesspublic RandomVariableInterface getFactorLoading(int timeIndex, int factor, int component, RandomVariableInterface[] realizationAtTimeIndex)
LogNormalProcessOverwrite this method if you would like to implement a multi factor model.
getFactorLoading in class LogNormalProcesstimeIndex - The time index of the simulation time discretization.factor - The factor index.component - The component index.realizationAtTimeIndex - The realization at the current time index.public RandomVariableInterface getAssetValue(int timeIndex, int assetIndex)
AssetModelMonteCarloSimulationInterfacegetAssetValue in interface AssetModelMonteCarloSimulationInterfacetimeIndex - Index of simulation timeassetIndex - Index of the asset (0 for a single asset model)public RandomVariableInterface getAssetValue(double time, int assetIndex)
AssetModelMonteCarloSimulationInterfacegetAssetValue in interface AssetModelMonteCarloSimulationInterfacetime - Simulation timeassetIndex - Index of the asset (0 for a single asset model)public RandomVariableInterface getMonteCarloWeights(double time)
MonteCarloSimulationInterfacegetMonteCarloWeights in interface MonteCarloSimulationInterfacetime - Time at which the process should be observedpublic RandomVariableInterface getNumeraire(int timeIndex)
AssetModelMonteCarloSimulationInterfacegetNumeraire in interface AssetModelMonteCarloSimulationInterfacetimeIndex - The time index (associated with this models time discretization).public RandomVariableInterface getNumeraire(double time)
AssetModelMonteCarloSimulationInterfacegetNumeraire in interface AssetModelMonteCarloSimulationInterfacetime - The time for which the numeraire is requested.public RandomVariableInterface getRandomVariableForConstant(double value)
MonteCarloSimulationInterfaceMonteCarloSimulationInterface.getRandomVariableForConstant in interface MonteCarloSimulationInterfacevalue - The constant value to be used for initialized the random variable.public double getRiskFreeRate()
public double getVolatility()
public AssetModelMonteCarloSimulationInterface getCloneWithModifiedSeed(int seed)
AssetModelMonteCarloSimulationInterfaceAssetModelMonteCarloSimulationInterface
using a different Monte-Carlo seed.getCloneWithModifiedSeed in interface AssetModelMonteCarloSimulationInterfaceseed - The seed of the underlying random number generator.public AssetModelMonteCarloSimulationInterface getCloneWithModifiedData(Map<String,Object> dataModified)
AssetModelMonteCarloSimulationInterfacegetCloneWithModifiedData in interface AssetModelMonteCarloSimulationInterfacegetCloneWithModifiedData in interface MonteCarloSimulationInterfacedataModified - The data which should be changed in the new modelCopyright © 2017. All rights reserved.