Module net.finmath.lib
Class CrossCurrencyLIBORMarketModelFromModels
- java.lang.Object
-
- net.finmath.montecarlo.hybridassetinterestrate.CrossCurrencyLIBORMarketModelFromModels
-
- All Implemented Interfaces:
Model,HybridAssetMonteCarloSimulation,MonteCarloSimulationModel
public class CrossCurrencyLIBORMarketModelFromModels extends Object implements HybridAssetMonteCarloSimulation
Cross Currency LIBOR Market Model with Black-Scholes FX Model.- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description CrossCurrencyLIBORMarketModelFromModels(String baseModel, Map<String,LIBORModelMonteCarloSimulationModel> interestRatesModels, Map<String,MonteCarloProcessFromProcessModel> fxModels)Create a Cross Currency LIBOR Market Model with Black-Scholes FX Model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LIBORModelMonteCarloSimulationModelgetBaseModel()MonteCarloSimulationModelgetCloneWithModifiedData(Map<String,Object> dataModified)Create a clone of this simulation modifying some of its properties (if any).RandomVariablegetMonteCarloWeights(double time)This method returns the weights of a weighted Monte Carlo method (the probability density).RandomVariablegetMonteCarloWeights(int timeIndex)This method returns the weights of a weighted Monte Carlo method (the probability density).intgetNumberOfPaths()Returns the numberOfPaths.RandomVariablegetNumeraire(double time)Return the (default) numeraire at a given time.RandomVariablegetNumeraire(String account, double time)Return the numeraire associated with a given (collateral or funding) account at a given time.RandomVariablegetRandomVariableForConstant(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 thisMonteCarloSimulationModel.doublegetTime(int timeIndex)Returns the time for a given time index.TimeDiscretizationgetTimeDiscretization()Returns the timeDiscretizationFromArray.intgetTimeIndex(double time)Returns the time index for a given time.RandomVariablegetValue(RiskFactorID riskFactorIdentifyer, double time)Return the random variable of a risk factor with a given name at a given observation time index.-
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.MonteCarloSimulationModel
getReferenceDate
-
-
-
-
Constructor Detail
-
CrossCurrencyLIBORMarketModelFromModels
public CrossCurrencyLIBORMarketModelFromModels(String baseModel, Map<String,LIBORModelMonteCarloSimulationModel> interestRatesModels, Map<String,MonteCarloProcessFromProcessModel> fxModels)
Create a Cross Currency LIBOR Market Model with Black-Scholes FX Model.- Parameters:
baseModel- The name of the interest rate model used for the numeraire.interestRatesModels- A collection of single currency interest rate models.fxModels- A collection of (corresponding) fx models.
-
-
Method Detail
-
getBaseModel
public LIBORModelMonteCarloSimulationModel getBaseModel()
-
getRandomVariableForConstant
public RandomVariable getRandomVariableForConstant(double value)
Description copied from interface:MonteCarloSimulationModelReturns 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 thisMonteCarloSimulationModel.- Specified by:
getRandomVariableForConstantin interfaceMonteCarloSimulationModel- Parameters:
value- The constant value to be used for initialized the random variable.- Returns:
- A new random variable.
-
getNumberOfPaths
public int getNumberOfPaths()
Description copied from interface:MonteCarloSimulationModelReturns the numberOfPaths.- Specified by:
getNumberOfPathsin interfaceMonteCarloSimulationModel- Returns:
- Returns the numberOfPaths.
-
getTimeDiscretization
public TimeDiscretization getTimeDiscretization()
Description copied from interface:MonteCarloSimulationModelReturns the timeDiscretizationFromArray.- Specified by:
getTimeDiscretizationin interfaceMonteCarloSimulationModel- Returns:
- Returns the timeDiscretizationFromArray.
-
getTime
public double getTime(int timeIndex)
Description copied from interface:MonteCarloSimulationModelReturns the time for a given time index.- Specified by:
getTimein interfaceMonteCarloSimulationModel- Parameters:
timeIndex- Time index- Returns:
- Returns the time for a given time index.
-
getTimeIndex
public int getTimeIndex(double time)
Description copied from interface:MonteCarloSimulationModelReturns the time index for a given time.- Specified by:
getTimeIndexin interfaceMonteCarloSimulationModel- Parameters:
time- The time.- Returns:
- Returns the time index for a given time.
-
getMonteCarloWeights
public RandomVariable getMonteCarloWeights(int timeIndex) throws CalculationException
Description copied from interface:MonteCarloSimulationModelThis method returns the weights of a weighted Monte Carlo method (the probability density).- Specified by:
getMonteCarloWeightsin interfaceMonteCarloSimulationModel- Parameters:
timeIndex- Time index at which the process should be observed- Returns:
- A vector of positive weights which sums up to one
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getMonteCarloWeights
public RandomVariable getMonteCarloWeights(double time) throws CalculationException
Description copied from interface:MonteCarloSimulationModelThis method returns the weights of a weighted Monte Carlo method (the probability density).- Specified by:
getMonteCarloWeightsin interfaceMonteCarloSimulationModel- Parameters:
time- Time at which the process should be observed- Returns:
- A vector of positive weights which sums up to one
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getCloneWithModifiedData
public MonteCarloSimulationModel getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationException
Description copied from interface:MonteCarloSimulationModelCreate a clone of this simulation modifying some of its properties (if any). The properties that should be modified correspond to arguments of constructors. A constructor is then called with where all arguments that are not found in the key value map are being set to this objects values.- Specified by:
getCloneWithModifiedDatain interfaceMonteCarloSimulationModel- Parameters:
dataModified- The data which should be changed in the new model. This is a key value may, where the key corresponds to the name of a property in one of the objects constructors.- Returns:
- Returns a clone of this object, with some data modified (then it is no longer a clone :-)
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getNumeraire
public RandomVariable getNumeraire(double time) throws CalculationException
Description copied from interface:HybridAssetMonteCarloSimulationReturn the (default) numeraire at a given time.- Specified by:
getNumerairein interfaceHybridAssetMonteCarloSimulation- Parameters:
time- The time for which the numeraire is returned.- Returns:
- The numeraire at a given time.
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getNumeraire
public RandomVariable getNumeraire(String account, double time) throws CalculationException
Description copied from interface:HybridAssetMonteCarloSimulationReturn the numeraire associated with a given (collateral or funding) account at a given time.- Specified by:
getNumerairein interfaceHybridAssetMonteCarloSimulation- Parameters:
account- The account associated with this numeraire.time- The time for which the numeraire is returned.- Returns:
- The numeraire at a given time.
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getValue
public RandomVariable getValue(RiskFactorID riskFactorIdentifyer, double time) throws CalculationException
Description copied from interface:HybridAssetMonteCarloSimulationReturn the random variable of a risk factor with a given name at a given observation time index.- Specified by:
getValuein interfaceHybridAssetMonteCarloSimulation- Parameters:
riskFactorIdentifyer- The identifier of the risk factor.time- The time at which the risk factor is observed.- Returns:
- Random variable representing the corresponding risk factor.
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
-