public class MonteCarloBlackScholesModel2 extends LogNormalProcess implements AssetModelMonteCarloSimulationModel
LogNormalProcess.Scheme| Constructor and Description |
|---|
MonteCarloBlackScholesModel2(TimeDiscretization timeDiscretization,
int numberOfPaths,
double initialValue,
double riskFreeRate,
double volatility)
Create a Monte-Carlo simulation using given time discretization.
|
MonteCarloBlackScholesModel2(TimeDiscretization 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 |
|---|---|
RandomVariable |
getAssetValue(double time,
int assetIndex)
Returns the random variable representing the asset's value at a given time for a given asset.
|
RandomVariable |
getAssetValue(int timeIndex,
int assetIndex)
Returns the random variable representing the asset's value at a given time for a given asset.
|
AssetModelMonteCarloSimulationModel |
getCloneWithModifiedData(Map<String,Object> dataModified)
Create a clone of this simulation modifying some of its properties (if any).
|
AssetModelMonteCarloSimulationModel |
getCloneWithModifiedSeed(int seed)
Create a clone of the object implementing
AssetModelMonteCarloSimulationModel
using a different Monte-Carlo seed. |
RandomVariable |
getDrift(int timeIndex,
int componentIndex,
RandomVariable[] realizationAtTimeIndex,
RandomVariable[] realizationPredictor) |
RandomVariable |
getFactorLoading(int timeIndex,
int factor,
int component,
RandomVariable[] realizationAtTimeIndex)
This method should be overwritten and return the factor loading, i.e.
|
RandomVariable[] |
getInitialValue() |
RandomVariable |
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.
|
RandomVariable |
getNumeraire(double time)
Returns the numeraire associated with the valuation measure used by this model.
|
RandomVariable |
getNumeraire(int timeIndex)
Returns the numeraire associated with the valuation measure used by this model.
|
RandomVariable |
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
MonteCarloSimulationModel. |
LocalDateTime |
getReferenceDate()
Returns the model's date corresponding to the time discretization's \( t = 0 \).
|
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(TimeDiscretization 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(TimeDiscretization 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 LocalDateTime getReferenceDate()
MonteCarloSimulationModelgetReferenceDate in interface MonteCarloSimulationModelpublic int getNumberOfAssets()
AssetModelMonteCarloSimulationModelgetNumberOfAssets in interface AssetModelMonteCarloSimulationModelpublic RandomVariable[] getInitialValue()
getInitialValue in class LogNormalProcesspublic RandomVariable getDrift(int timeIndex, int componentIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
getDrift in class LogNormalProcesspublic RandomVariable getFactorLoading(int timeIndex, int factor, int component, RandomVariable[] 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 RandomVariable getAssetValue(int timeIndex, int assetIndex)
AssetModelMonteCarloSimulationModelgetAssetValue in interface AssetModelMonteCarloSimulationModeltimeIndex - Index of simulation timeassetIndex - Index of the asset (0 for a single asset model)public RandomVariable getAssetValue(double time, int assetIndex)
AssetModelMonteCarloSimulationModelgetAssetValue in interface AssetModelMonteCarloSimulationModeltime - Simulation timeassetIndex - Index of the asset (0 for a single asset model)public RandomVariable getMonteCarloWeights(double time)
MonteCarloSimulationModelgetMonteCarloWeights in interface MonteCarloSimulationModeltime - Time at which the process should be observedpublic RandomVariable getNumeraire(int timeIndex)
AssetModelMonteCarloSimulationModelgetNumeraire in interface AssetModelMonteCarloSimulationModeltimeIndex - The time index (associated with this models time discretization).public RandomVariable getNumeraire(double time)
AssetModelMonteCarloSimulationModelgetNumeraire in interface AssetModelMonteCarloSimulationModeltime - The time for which the numeraire is requested.public RandomVariable getRandomVariableForConstant(double value)
MonteCarloSimulationModelMonteCarloSimulationModel.getRandomVariableForConstant in interface MonteCarloSimulationModelvalue - The constant value to be used for initialized the random variable.public double getRiskFreeRate()
public double getVolatility()
public AssetModelMonteCarloSimulationModel getCloneWithModifiedSeed(int seed)
AssetModelMonteCarloSimulationModelAssetModelMonteCarloSimulationModel
using a different Monte-Carlo seed.getCloneWithModifiedSeed in interface AssetModelMonteCarloSimulationModelseed - The seed of the underlying random number generator.public AssetModelMonteCarloSimulationModel getCloneWithModifiedData(Map<String,Object> dataModified)
AssetModelMonteCarloSimulationModelgetCloneWithModifiedData in interface AssetModelMonteCarloSimulationModelgetCloneWithModifiedData in interface MonteCarloSimulationModeldataModified - The data which should be changed in the new modelCopyright © 2019. All rights reserved.