java.lang.Object
net.finmath.singleswaprate.products.AbstractAnalyticVolatilityCubeProduct
net.finmath.singleswaprate.products.AbstractSingleSwapRateProduct
net.finmath.singleswaprate.products.AnnuityDummyProduct
- All Implemented Interfaces:
AnalyticProduct
,Product
,AnalyticVolatilityCubeProduct
A dummy product that only evaluates the value of a
AnnuityMapping
. This can be used to find the expectation correction factor in Piterbarg annuity mapping.- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionAnnuityDummyProduct(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, AnnuityMapping annuityMapping)
Create the dummy product for the given annuity mapping.AnnuityDummyProduct(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, AnnuityMapping.AnnuityMappingType annuityMappingType)
Create the dummy product with the annuity mapping specified by type. -
Method Summary
Modifier and TypeMethodDescriptionprotected AnnuityMapping
Since most annuity mappings require data from models to be created, but models are only provided at execution ofgetValue
, the product needs to dynamically be able to build its annuity mapping.protected double
hedgeWeight(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)
Essentially the second derivative of the payoff function.protected double
payoffFunction(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)
Payoff function of the product.protected double
singularAddon(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)
As some products have a portion of their weight in a singular point, this is portion is split off from thehedgeweight
and added after the integration.Methods inherited from class net.finmath.singleswaprate.products.AbstractSingleSwapRateProduct
getDiscountCurveName, getFixSchedule, getFloatSchedule, getForwardCurveName, getIntegrationLowerBound, getIntegrationNumberOfEvaluationPoints, getIntegrationUpperBound, getValue, getValue, getVolatilityCubeName, setIntegrationParameters, valueCall, valuePut
Methods inherited from class net.finmath.singleswaprate.products.AbstractAnalyticVolatilityCubeProduct
getValue, getValue, getValue
-
Constructor Details
-
AnnuityDummyProduct
public AnnuityDummyProduct(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, AnnuityMapping.AnnuityMappingType annuityMappingType)Create the dummy product with the annuity mapping specified by type. The mapping will be generated at execution ofgetValue
.- Parameters:
fixSchedule
- The fix schedule of the swap.floatSchedule
- The float schedule of the swap.discountCurveName
- The name of the discount curve.forwardCurveName
- The name of the forward curve.volatilityCubeName
- The name of the volatility cube.annuityMappingType
- The type of the annuity mapping.
-
AnnuityDummyProduct
public AnnuityDummyProduct(Schedule fixSchedule, Schedule floatSchedule, String discountCurveName, String forwardCurveName, String volatilityCubeName, AnnuityMapping annuityMapping)Create the dummy product for the given annuity mapping.- Parameters:
fixSchedule
- The fix schedule of the swap.floatSchedule
- The float schedule of the swap.discountCurveName
- The name of the discount curve.forwardCurveName
- The name of the forward curve.volatilityCubeName
- The name of the volatility cube.annuityMapping
- The annuity mapping.
-
-
Method Details
-
payoffFunction
protected double payoffFunction(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)Description copied from class:AbstractSingleSwapRateProduct
Payoff function of the product. Dependent only on the swap rate.- Specified by:
payoffFunction
in classAbstractSingleSwapRateProduct
- Parameters:
swapRate
- The swap rate.annuityMapping
- The annuity mapping to use.model
- The model for context.- Returns:
- The payoff of the product.
-
hedgeWeight
protected double hedgeWeight(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)Description copied from class:AbstractSingleSwapRateProduct
Essentially the second derivative of the payoff function. The hedgeweight determines the weight of the puts and calls under the integral when replicating.- Specified by:
hedgeWeight
in classAbstractSingleSwapRateProduct
- Parameters:
swapRate
- The swap rate.annuityMapping
- The annuity mapping to use.model
- The model for context.- Returns:
- The weight during replication.
-
singularAddon
protected double singularAddon(double swapRate, AnnuityMapping annuityMapping, VolatilityCubeModel model)Description copied from class:AbstractSingleSwapRateProduct
As some products have a portion of their weight in a singular point, this is portion is split off from thehedgeweight
and added after the integration.- Specified by:
singularAddon
in classAbstractSingleSwapRateProduct
- Parameters:
swapRate
- The swap rate.annuityMapping
- The annuity mapping to use.model
- The model for context.- Returns:
- The singular addon.
-
buildAnnuityMapping
Description copied from class:AbstractSingleSwapRateProduct
Since most annuity mappings require data from models to be created, but models are only provided at execution ofgetValue
, the product needs to dynamically be able to build its annuity mapping. This method may be left to returnnull
, if the product requires no annuity mapping or is intended to always receive an annuity mapping for evaluation.- Specified by:
buildAnnuityMapping
in classAbstractSingleSwapRateProduct
- Parameters:
model
- The model for context.- Returns:
- The annuity mapping.
-