Class SimplifiedLinearAnnuityMapping

java.lang.Object
net.finmath.singleswaprate.annuitymapping.SimplifiedLinearAnnuityMapping
All Implemented Interfaces:
AnnuityMapping

public class SimplifiedLinearAnnuityMapping extends Object implements AnnuityMapping
Provides a light-weight linear annuity mapping.
Author:
Christian Fries, Roland Bachl
  • 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 interface AnnuityMapping
      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 interface AnnuityMapping
      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 interface AnnuityMapping
      Parameters:
      swapRate - The swap rate at which to evaluate the annuity mapping.
      Returns:
      The second derivative of the annuity mapping.