java.lang.Object
net.finmath.marketdata2.products.AbstractAnalyticProduct
net.finmath.marketdata2.products.SwapAnnuity
 All Implemented Interfaces:
AnalyticProduct
,Product
Implements the valuation of a swap annuity using curves (discount curve).
Support for day counting is limited to the capabilities of
TimeDiscretization
. Version:
 1.0
 Author:
 Christian Fries

Constructor Summary
ConstructorDescriptionSwapAnnuity
(Schedule schedule, String discountCurveName) Creates a swap annuity for a given schedule and discount curve. 
Method Summary
Modifier and TypeMethodDescriptionstatic RandomVariable
getSwapAnnuity
(double evaluationTime, Schedule schedule, DiscountCurveInterface discountCurve, AnalyticModel model) Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static RandomVariable
getSwapAnnuity
(Schedule schedule, DiscountCurveInterface discountCurve) Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static RandomVariable
getSwapAnnuity
(Schedule schedule, ForwardCurveInterface forwardCurve) Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve.static RandomVariable
getSwapAnnuity
(TimeDiscretization tenor, DiscountCurveInterface discountCurve) Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static RandomVariable
getSwapAnnuity
(TimeDiscretization tenor, ForwardCurveInterface forwardCurve) Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve.getValue
(double evaluationTime, AnalyticModel model) Return the valuation of the product using the given model.toString()
Methods inherited from class net.finmath.marketdata2.products.AbstractAnalyticProduct
getValue, getValue

Constructor Details

SwapAnnuity
Creates a swap annuity for a given schedule and discount curve. Parameters:
schedule
 TenorFromArray of the swap annuity.discountCurveName
 Name of the discount curve for the swap annuity.


Method Details

getValue
Description copied from interface:AnalyticProduct
Return the valuation of the product using the given model. The model has to implement the modes ofAnalyticModel
. Specified by:
getValue
in interfaceAnalyticProduct
 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:
 The value of the product using the given model.

getSwapAnnuity
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, DiscountCurveInterface discountCurve) Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Parameters:
tenor
 The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.discountCurve
 The discount curve. Returns:
 The swap annuity.

getSwapAnnuity
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, ForwardCurveInterface forwardCurve) Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classical single curve interpretations of forwards and a default period length. The may be a crude approximation. Parameters:
tenor
 The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.forwardCurve
 The forward curve. Returns:
 The swap annuity.

getSwapAnnuity
public static RandomVariable getSwapAnnuity(Schedule schedule, DiscountCurveInterface discountCurve) Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note: This method will consider evaluationTime being 0, seegetSwapAnnuity(double, Schedule, DiscountCurveInterface, AnalyticModel)
. Parameters:
schedule
 The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.discountCurve
 The discount curve. Returns:
 The swap annuity.

getSwapAnnuity
Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classical single curve interpretations of forwards and a default period length. The may be a crude approximation. Note: This method will consider evaluationTime being 0, seegetSwapAnnuity(double, Schedule, DiscountCurveInterface, AnalyticModel)
. Parameters:
schedule
 The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.forwardCurve
 The forward curve. Returns:
 The swap annuity.

getSwapAnnuity
public static RandomVariable getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurveInterface discountCurve, AnalyticModel model) Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note that, the value returned is divided by the discount factor at evaluation. This matters, if the discount factor at evaluationTime is not equal to 1.0. Parameters:
evaluationTime
 The evaluation time as double. Cash flows prior and including this time are not considered.schedule
 The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period.discountCurve
 The discount curve.model
 The model, needed only in case the discount curve evaluation depends on an additional curve. Returns:
 The swap annuity.

toString
