Module net.finmath.lib
Class MultiPiterbargAnnuityMapping
java.lang.Object
net.finmath.singleswaprate.annuitymapping.MultiPiterbargAnnuityMapping
- All Implemented Interfaces:
AnnuityMapping
Implements an annuity mapping following Vladimir Piterbarg's approach.
- Author:
- Christian Fries, Roland Bachl
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.finmath.singleswaprate.annuitymapping.AnnuityMapping
AnnuityMapping.AnnuityMappingType
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPiterbargAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, double strike, VolatilityCubeModel model, String discountCurveName, String forwardCurveName, String volatilityCubeName, double lowerBound, double upperBound, int numberOfEvaluationPoints)
Create the annuity mapping.MultiPiterbargAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, VolatilityCubeModel model, String discountCurveName, String forwardCurveName, String volatilityCubeName)
Create the annuity mapping. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getFirstDerivative(double swapRate)
Return the first derivative of the annuity mapping for the given swap rate.double
getSecondDerivative(double swapRate)
Return the second derivative of the annuity mapping for the given swap rate.double
getValue(double swapRate)
Return the value the fraction of annuities take, when the realized swap rate meets the given swap rate.
-
Constructor Details
-
MultiPiterbargAnnuityMapping
public MultiPiterbargAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, VolatilityCubeModel model, String discountCurveName, String forwardCurveName, String volatilityCubeName)Create the annuity mapping. When used without strike the volatilities are taken out of the cube at par swap rate.- Parameters:
fixSchedule
- Fix leg schedule of the swap.floatSchedule
- Float leg schedule of the swap.model
- The model containing curve and cube.discountCurveName
- The name of the discount curve.forwardCurveName
- The name of the forward curve.volatilityCubeName
- The name of the volatility cube.
-
MultiPiterbargAnnuityMapping
public MultiPiterbargAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, double strike, VolatilityCubeModel model, String discountCurveName, String forwardCurveName, String volatilityCubeName, double lowerBound, double upperBound, int numberOfEvaluationPoints)Create the annuity mapping.- Parameters:
fixSchedule
- Fix leg schedule of the swap.floatSchedule
- Float leg schedule of the swap.strike
- The strike of the product this annuity mapping is being created for.model
- The model containing curve and cube.discountCurveName
- The name of the discount curve.forwardCurveName
- The name of the forward curve.volatilityCubeName
- The name of the volatility cube.lowerBound
- The lowest strike the Piterbarg annuity mapping may use during replication, when normalizing.upperBound
- The maximum strike the Piterbarg annuity mapping may use during replication, when normalizing.numberOfEvaluationPoints
- The number of points the replication may evaluate Piterbarg annuity mapping is normalizing.
-
-
Method Details
-
getValue
public double getValue(double swapRate)Description copied from interface:AnnuityMapping
Return the value the fraction of annuities take, when the realized swap rate meets the given swap rate.- Specified by:
getValue
in interfaceAnnuityMapping
- Parameters:
swapRate
- The swap rate at which to evaluate the annuity mapping.- Returns:
- The value of the annuity mapping.
-
getFirstDerivative
public double getFirstDerivative(double swapRate)Description copied from interface:AnnuityMapping
Return the first derivative of the annuity mapping for the given swap rate.- Specified by:
getFirstDerivative
in interfaceAnnuityMapping
- Parameters:
swapRate
- The swap rate at which to evaluate the annuity mapping.- Returns:
- The first derivative of the annuity mapping.
-
getSecondDerivative
public double getSecondDerivative(double swapRate)Description copied from interface:AnnuityMapping
Return the second derivative of the annuity mapping for the given swap rate.- Specified by:
getSecondDerivative
in interfaceAnnuityMapping
- Parameters:
swapRate
- The swap rate at which to evaluate the annuity mapping.- Returns:
- The second derivative of the annuity mapping.
-