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
ConstructorsConstructorDescriptionCrossCurrencyLIBORMarketModelFromModels(String baseModel, Map<String,LIBORModelMonteCarloSimulationModel> interestRatesModels, Map<String,MonteCarloProcessFromProcessModel> fxModels)
Create a Cross Currency LIBOR Market Model with Black-Scholes FX Model. -
Method Summary
Modifier and TypeMethodDescriptiongetCloneWithModifiedData(Map<String,Object> dataModified)
Create a clone of this simulation modifying some of its properties (if any).getMonteCarloWeights(double time)
This method returns the weights of a weighted Monte Carlo method (the probability density).getMonteCarloWeights(int timeIndex)
This method returns the weights of a weighted Monte Carlo method (the probability density).int
Returns the numberOfPaths.getNumeraire(double time)
Return the (default) numeraire at a given time.getNumeraire(String account, double time)
Return the numeraire associated with a given (collateral or funding) account at a given time.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 thisMonteCarloSimulationModel
.double
getTime(int timeIndex)
Returns the time for a given time index.Returns the timeDiscretizationFromArray.int
getTimeIndex(double time)
Returns the time index for a given time.getValue(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 Details
-
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 Details
-
getBaseModel
-
getRandomVariableForConstant
Description copied from interface:MonteCarloSimulationModel
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
.- Specified by:
getRandomVariableForConstant
in 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:MonteCarloSimulationModel
Returns the numberOfPaths.- Specified by:
getNumberOfPaths
in interfaceMonteCarloSimulationModel
- Returns:
- Returns the numberOfPaths.
-
getTimeDiscretization
Description copied from interface:MonteCarloSimulationModel
Returns the timeDiscretizationFromArray.- Specified by:
getTimeDiscretization
in interfaceMonteCarloSimulationModel
- Returns:
- Returns the timeDiscretizationFromArray.
-
getTime
public double getTime(int timeIndex)Description copied from interface:MonteCarloSimulationModel
Returns the time for a given time index.- Specified by:
getTime
in interfaceMonteCarloSimulationModel
- Parameters:
timeIndex
- Time index- Returns:
- Returns the time for a given time index.
-
getTimeIndex
public int getTimeIndex(double time)Description copied from interface:MonteCarloSimulationModel
Returns the time index for a given time.- Specified by:
getTimeIndex
in interfaceMonteCarloSimulationModel
- Parameters:
time
- The time.- Returns:
- Returns the time index for a given time.
-
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:
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
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
- Throws:
CalculationException
- Thrown if the valuation fails, specific cause may be available via thecause()
method.
-
getCloneWithModifiedData
public MonteCarloSimulationModel getCloneWithModifiedData(Map<String,Object> dataModified) throws CalculationExceptionDescription copied from interface:MonteCarloSimulationModel
Create 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:
getCloneWithModifiedData
in 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
Description copied from interface:HybridAssetMonteCarloSimulation
Return the (default) numeraire at a given time.- Specified by:
getNumeraire
in 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
Description copied from interface:HybridAssetMonteCarloSimulation
Return the numeraire associated with a given (collateral or funding) account at a given time.- Specified by:
getNumeraire
in 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 CalculationExceptionDescription copied from interface:HybridAssetMonteCarloSimulation
Return the random variable of a risk factor with a given name at a given observation time index.- Specified by:
getValue
in 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.
-