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
Constructors Constructor Description InterestRateSwapLegProductDescriptor(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 Type Method Description StringgetDiscountCurveName()Return the name of the discount curve in this descriptor.StringgetForwardCurveName()Return the name of the forward curve in this descriptor.ScheduleDescriptorgetLegScheduleDescriptor()Return the descriptor of the schedule of this product descriptor.double[]getNotionals()Return the notionals per period of this descriptor.double[]getSpreads()Return the spreads per period of this descriptor.booleanisNotionalExchanged()Indicates whether the leg exchanges notional.Stringname()Return the name of the model represented by this descriptor.Integerversion()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:ProductDescriptorReturn the version of the model description.- Specified by:
versionin interfaceProductDescriptor- Returns:
- Version number.
-
name
Description copied from interface:ProductDescriptorReturn the name of the model represented by this descriptor.- Specified by:
namein interfaceProductDescriptor- Returns:
- Name of the model.
-