Module net.finmath.lib
Package net.finmath.modelling.descriptor
Class InterestRateSwapLegProductDescriptor
java.lang.Object
net.finmath.modelling.descriptor.InterestRateSwapLegProductDescriptor
- All Implemented Interfaces:
InterestRateProductDescriptor
,ProductDescriptor
public class InterestRateSwapLegProductDescriptor
extends Object
implements InterestRateProductDescriptor
Product descriptor for an interest rate swap leg.
- Version:
- 1.0
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionInterestRateSwapLegProductDescriptor(String forwardCurveName, String discountCurveName, ScheduleDescriptor legSchedule, double[] notionals, double[] spreads, boolean isNotionalExchanged)
Create the descriptor with notional and spread variable between periods.InterestRateSwapLegProductDescriptor(String forwardCurveName, String discountCurveName, ScheduleDescriptor legSchedule, double notional, double spread, boolean isNotionalExchanged)
Create the descriptor with period uniform notional and spread. -
Method Summary
Modifier and TypeMethodDescriptionReturn the name of the discount curve in this descriptor.Return the name of the forward curve in this descriptor.Return the descriptor of the schedule of this product descriptor.double[]
Return the notionals per period of this descriptor.double[]
Return the spreads per period of this descriptor.boolean
Indicates whether the leg exchanges notional.name()
Return the name of the model represented by this descriptor.version()
Return the version of the model description.
-
Constructor Details
-
InterestRateSwapLegProductDescriptor
public InterestRateSwapLegProductDescriptor(String forwardCurveName, String discountCurveName, ScheduleDescriptor legSchedule, double notional, double spread, boolean isNotionalExchanged)Create the descriptor with period uniform notional and spread.- Parameters:
forwardCurveName
- The name of the forward curve this leg is quoted on. (Or null/empty)discountCurveName
- The name of the curve this leg is to be discounted with.legSchedule
- ScheduleFromPeriods of the leg.notional
- The notional.spread
- Fixed spread on the forward or fix rate.isNotionalExchanged
- If true, the leg will pay notional at the beginning of the swap and receive notional at the end of the swap.
-
InterestRateSwapLegProductDescriptor
public InterestRateSwapLegProductDescriptor(String forwardCurveName, String discountCurveName, ScheduleDescriptor legSchedule, double[] notionals, double[] spreads, boolean isNotionalExchanged)Create the descriptor with notional and spread variable between periods.- Parameters:
forwardCurveName
- The name of the forward curve this leg is quoted on. (Or null/empty)discountCurveName
- The name of the curve this leg is to be discounted with.legSchedule
- ScheduleFromPeriods of the leg.notionals
- Array of notionals for each period.spreads
- Array of fixed spreads on the forward or fix rates for each period.isNotionalExchanged
- If true, the leg will pay notional at the beginning of the swap and receive notional at the end of the swap.
-
-
Method Details
-
getForwardCurveName
Return the name of the forward curve in this descriptor.- Returns:
- Name of the forward curve.
-
getDiscountCurveName
Return the name of the discount curve in this descriptor.- Returns:
- Name of the discount curve.
-
getLegScheduleDescriptor
Return the descriptor of the schedule of this product descriptor.- Returns:
- The schedule descriptor.
-
getNotionals
public double[] getNotionals()Return the notionals per period of this descriptor.- Returns:
- Array of notionals.
-
getSpreads
public double[] getSpreads()Return the spreads per period of this descriptor.- Returns:
- Array of spreads.
-
isNotionalExchanged
public boolean isNotionalExchanged()Indicates whether the leg exchanges notional.- Returns:
- true, if the leg pays notional at the beginning of the swap and reveives notional at the end.
-
version
Description copied from interface:ProductDescriptor
Return the version of the model description.- Specified by:
version
in interfaceProductDescriptor
- Returns:
- Version number.
-
name
Description copied from interface:ProductDescriptor
Return the name of the model represented by this descriptor.- Specified by:
name
in interfaceProductDescriptor
- Returns:
- Name of the model.
-