Module net.finmath.lib
Class ForwardAgreementWithFundingRequirement
java.lang.Object
net.finmath.montecarlo.AbstractMonteCarloProduct
net.finmath.montecarlo.assetderivativevaluation.products.AbstractAssetMonteCarloProduct
net.finmath.montecarlo.assetderivativevaluation.products.ForwardAgreementWithFundingRequirement
- All Implemented Interfaces:
Product
,AssetMonteCarloProduct
,MonteCarloProduct
Implements the valuation of a forward on a single asset.
Given a model for an asset S, the Forward Agreement with forward K, maturity T
pays
V(T) = S(T) - K in T.
The
V(T) = S(T) - K in T.
The
getValue
method of this class will return the random variable N(t) * V(T) / N(T),
where N is the numeraire provided by the model. If N(t) is deterministic,
calling getAverage
on this random variable will result in the value. Otherwise a
conditional expectation has to be applied.- Version:
- 1.3
- Author:
- Christian Fries
-
Constructor Summary
ConstructorsConstructorDescriptionForwardAgreementWithFundingRequirement(double maturity, double forwardValue)
Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).ForwardAgreementWithFundingRequirement(double maturity, double forwardValue, int underlyingIndex, FundingCapacity fundingCapacity)
Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).ForwardAgreementWithFundingRequirement(String underlyingName, double maturity, double forwardValue, FundingCapacity fundingCapacity)
Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case). -
Method Summary
Modifier and TypeMethodDescriptiongetValue(double evaluationTime, AssetModelMonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.Return the valuation of the product using the given model.Methods inherited from class net.finmath.montecarlo.assetderivativevaluation.products.AbstractAssetMonteCarloProduct
getValue
Methods inherited from class net.finmath.montecarlo.AbstractMonteCarloProduct
getCurrency, getValue, getValue, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toString
-
Constructor Details
-
ForwardAgreementWithFundingRequirement
public ForwardAgreementWithFundingRequirement(String underlyingName, double maturity, double forwardValue, FundingCapacity fundingCapacity)Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).- Parameters:
underlyingName
- Name of the underlyingmaturity
- The maturity T in the option payoff S(T)-KforwardValue
- The strike K in the option payoff S(T)-K.fundingCapacity
- A funding capacity monitor.
-
ForwardAgreementWithFundingRequirement
public ForwardAgreementWithFundingRequirement(double maturity, double forwardValue, int underlyingIndex, FundingCapacity fundingCapacity)Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).- Parameters:
maturity
- The maturity T in the option payoff max(S(T)-K,0)forwardValue
- The strike K in the option payoff max(S(T)-K,0).underlyingIndex
- The index of the underlying to be fetched from the model.fundingCapacity
- A funding capacity monitor.
-
ForwardAgreementWithFundingRequirement
public ForwardAgreementWithFundingRequirement(double maturity, double forwardValue)Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).- Parameters:
maturity
- The maturity T in the option payoff max(S(T)-K,0)forwardValue
- The strike K in the option payoff max(S(T)-K,0).
-
-
Method Details
-
getValue
public RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationExceptionThis method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: 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. Cashflows prior evaluationTime are not considered.- Specified by:
getValue
in interfaceAssetMonteCarloProduct
- Specified by:
getValue
in classAbstractAssetMonteCarloProduct
- 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
Description copied from interface:Product
Return the valuation of the product using the given model. Implement this method using a checked cast of the model to a derived model for which the product provides a valuation algorithm. Example: an interest rate product requires that the passed model object implements the interface of an interest rate model. Since there is no polymorphism on arguments (see Double Dynamic Dispatch), we reply on a checked cast.- Specified by:
getValues
in interfaceMonteCarloProduct
- Specified by:
getValues
in interfaceProduct
- Overrides:
getValues
in classAbstractMonteCarloProduct
- Parameters:
evaluationTime
- The evaluation time as double. Cash flows prior and including this time are not considered.model
- The model under which the product is valued.- Returns:
- Map containing the value of the product using the given model.
-