 java.lang.Object

 net.finmath.marketdata.products.AbstractAnalyticProduct

 net.finmath.marketdata.products.SwapAnnuity

 All Implemented Interfaces:
AnalyticProduct
,Product
public class SwapAnnuity extends AbstractAnalyticProduct implements AnalyticProduct
Implements the valuation of a swap annuity using curves (discount curve). Support for day counting is limited to the capabilities ofTimeDiscretization
. Version:
 1.0
 Author:
 Christian Fries


Constructor Summary
Constructors Constructor Description SwapAnnuity(Schedule schedule, String discountCurveName)
Creates a swap annuity for a given schedule and discount curve.

Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurve discountCurve, AnalyticModel model)
Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static double
getSwapAnnuity(Schedule schedule, DiscountCurve discountCurve)
Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static double
getSwapAnnuity(Schedule schedule, ForwardCurve forwardCurve)
Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve.static double
getSwapAnnuity(TimeDiscretization tenor, DiscountCurve discountCurve)
Function to calculate an (idealized) swap annuity for a given schedule and discount curve.static double
getSwapAnnuity(TimeDiscretization tenor, ForwardCurve forwardCurve)
Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve.double
getValue(double evaluationTime, AnalyticModel model)
Return the valuation of the product using the given model.String
toString()

Methods inherited from class net.finmath.marketdata.products.AbstractAnalyticProduct
getValue, getValue




Method Detail

getValue
public double getValue(double evaluationTime, AnalyticModel model)
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 double getSwapAnnuity(TimeDiscretization tenor, DiscountCurve 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 double getSwapAnnuity(TimeDiscretization tenor, ForwardCurve 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 double getSwapAnnuity(Schedule schedule, DiscountCurve 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, DiscountCurve, 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
public static double getSwapAnnuity(Schedule schedule, ForwardCurve 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. Note: This method will consider evaluationTime being 0, seegetSwapAnnuity(double, Schedule, DiscountCurve, 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 double getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurve 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.

