finMath lib documentation
net.finmath.marketdata.products

Class SwapLegWithResetting

• All Implemented Interfaces:
AnalyticProductInterface, ProductInterface

public class SwapLegWithResetting
extends AbstractAnalyticProduct
implements AnalyticProductInterface
Implements the valuation of a swap leg with notional reset using curves (discount curve, forward curve). The swap leg valuation supports distinct discounting and forward curves. The swap leg uses the notional $N_{i} := df^{2}(T_{i}) / df^{1}(T_{i})$ for each period $$i$$, where $$T_{i}$$ is the period start date fetched form the leg schedule, $$df^{1}$$ is the swap legs collateral discount curve and $$df^{2}$$ is an additional discount curve. Effectively this implies that the value of the period start notional payment of this leg agrees with a leg discounted with curve $$df^{2}$$, that is, the notional is reset to make the two notionals being at par. Support for day counting is provided via the class implementing ScheduleInterface.
Author:
Christian Fries
• Constructor Detail

• SwapLegWithResetting

public SwapLegWithResetting(ScheduleInterface legSchedule,
String forwardCurveName,
String discountCurveName,
String discountCurveForNotionalResetName,
boolean isNotionalExchanged)
Creates a swap leg. The swap leg uses the notional $N_{i} := df^{2}(T_{i}) / df^{1}(T_{i})$ for each period $$i$$, where $$T_{i}$$ is the period start date fetched form the leg schedule. Effectively this implies that the value of the period start notional payment of this leg agrees with a leg discounted with curve $$df^{2}$$, that is, the notional is reset to make the two notionals being at par. .
Parameters:
legSchedule - Schedule of the leg.
forwardCurveName - Name of the forward curve, leave empty if this is a fix leg.
discountCurveName - Name of the discount curve for the leg.
discountCurveForNotionalResetName - Name of the discount curve used for notional reset.
isNotionalExchanged - If true, the leg will pay notional at the beginning of each swap period and receive notional at the end of the swap period. Note that the cash flow date for the notional is periodStart and periodEnd (not fixingDate and paymentDate).
• SwapLegWithResetting

public SwapLegWithResetting(ScheduleInterface legSchedule,
String forwardCurveName,
String discountCurveName,
String discountCurveForNotionalResetName)
Creates a swap leg (without notional exchange). The swap leg has a unit notional of 1.
Parameters:
legSchedule - Schedule of the leg.
forwardCurveName - Name of the forward curve, leave empty if this is a fix leg.
discountCurveName - Name of the discount curve for the leg.
discountCurveForNotionalResetName - Name of the discount curve used for notional reset.
• Method Detail

• getValue

public double getValue(double evaluationTime,
AnalyticModelInterface model)
Description copied from interface: AnalyticProductInterface
Return the valuation of the product using the given model. The model has to implement the modes of AnalyticModelInterface.
Specified by:
getValue in interface AnalyticProductInterface
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.
• getForwardCurveName

public String getForwardCurveName()