Module net.finmath.lib
Class SimplifiedLinearAnnuityMapping
java.lang.Object
net.finmath.singleswaprate.annuitymapping.SimplifiedLinearAnnuityMapping
- All Implemented Interfaces:
AnnuityMapping
Provides a light-weight linear annuity mapping.
- Author:
- Christian Fries, Roland Bachl
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.finmath.singleswaprate.annuitymapping.AnnuityMapping
AnnuityMapping.AnnuityMappingType
-
Constructor Summary
ConstructorsConstructorDescriptionSimplifiedLinearAnnuityMapping(Schedule schedule, double initialAnnuity, double initialSwapRate, double discountFactor)
SimplifiedLinearAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, AnalyticModel model, String discountCurveName)
Construct 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
-
SimplifiedLinearAnnuityMapping
public SimplifiedLinearAnnuityMapping(Schedule schedule, double initialAnnuity, double initialSwapRate, double discountFactor) -
SimplifiedLinearAnnuityMapping
public SimplifiedLinearAnnuityMapping(Schedule fixSchedule, Schedule floatSchedule, AnalyticModel model, String discountCurveName)Construct the annuity mapping.- Parameters:
fixSchedule
- The schedule of the fix leg of the swap.floatSchedule
- The schedule of the float leg of the swap.model
- The model containing the curves.discountCurveName
- The discount curve.
-
-
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.
-