Module net.finmath.lib
Class SwaprateCovarianceAnalyticApproximation
java.lang.Object
net.finmath.montecarlo.AbstractMonteCarloProduct
net.finmath.montecarlo.interestrate.products.SwaprateCovarianceAnalyticApproximation
- All Implemented Interfaces:
Product
,MonteCarloProduct
This class implements an analytic approximation of the integrated instantaneous covariance
of two swap rates under a LIBOR market model.
- Version:
- 1.0
- Author:
- Christian Fries
-
Constructor Summary
ConstructorsConstructorDescriptionSwaprateCovarianceAnalyticApproximation(double[] swapTenor1, double[] swapTenor2)
Create the product implementing the analytic approximation of a swap rate covariance in a forward rate model. -
Method Summary
Modifier and TypeMethodDescriptiongetValue(double evaluationTime, MonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.getValues(double evaluationTime, TimeDiscretization timeDiscretization, LIBORMarketModel model)
Calculates the approximated integrated instantaneous covariance of two swap rates, using the approximation d log(S(t))/d log(L(t)) = d log(S(0))/d log(L(0)).Methods inherited from class net.finmath.montecarlo.AbstractMonteCarloProduct
getCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toString
-
Constructor Details
-
SwaprateCovarianceAnalyticApproximation
public SwaprateCovarianceAnalyticApproximation(double[] swapTenor1, double[] swapTenor2)Create the product implementing the analytic approximation of a swap rate covariance in a forward rate model.- Parameters:
swapTenor1
- The swap tenor of the first rate in doubles.swapTenor2
- The swap tenor of the second rate in doubles.
-
-
Method Details
-
getValue
public RandomVariable getValue(double evaluationTime, MonteCarloSimulationModel model) throws CalculationExceptionDescription copied from interface:MonteCarloProduct
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. More generally: The value random variable is a random variable V*(t) such that the time-t conditional expectation of V*(t) is equal to the value of the financial product in time t. An example for V*(t) is the sum of t-discounted payoffs. Cashflows prior evaluationTime are not considered.- Specified by:
getValue
in interfaceMonteCarloProduct
- Specified by:
getValue
in classAbstractMonteCarloProduct
- Parameters:
evaluationTime
- The time on which this products value should be observed.model
- The model used to price the product.- Returns:
- The random variable representing the value of the product discounted to evaluation time
- Throws:
CalculationException
- Thrown if the valuation fails, specific cause may be available via thecause()
method.
-
getValues
public RandomVariable getValues(double evaluationTime, TimeDiscretization timeDiscretization, LIBORMarketModel model)Calculates the approximated integrated instantaneous covariance of two swap rates, using the approximation d log(S(t))/d log(L(t)) = d log(S(0))/d log(L(0)).- Parameters:
evaluationTime
- The evaluation time.timeDiscretization
- The time discretization used for integrating the covariance.model
- A model implementing the LIBORMarketModelFromCovarianceModel- Returns:
- Returns the approximated integrated instantaneous covariance of two swap rates.
-