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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDiscountCurveName()
Return the name of the discount curve in this descriptor.String
getForwardCurveName()
Return the name of the forward curve in this descriptor.ScheduleDescriptor
getLegScheduleDescriptor()
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.boolean
isNotionalExchanged()
Indicates whether the leg exchanges notional.String
name()
Return the name of the model represented by this descriptor.Integer
version()
Return the version of the model description.
-
-
-
Constructor Detail
-
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 Detail
-
getForwardCurveName
public String getForwardCurveName()
Return the name of the forward curve in this descriptor.- Returns:
- Name of the forward curve.
-
getDiscountCurveName
public String getDiscountCurveName()
Return the name of the discount curve in this descriptor.- Returns:
- Name of the discount curve.
-
getLegScheduleDescriptor
public ScheduleDescriptor 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
public Integer version()
Description copied from interface:ProductDescriptor
Return the version of the model description.- Specified by:
version
in interfaceProductDescriptor
- Returns:
- Version number.
-
name
public String 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.
-
-