Package org.drip.product.params
Class CouponSetting
java.lang.Object
org.drip.product.params.CouponSetting
- All Implemented Interfaces:
Validatable
public class CouponSetting extends java.lang.Object implements Validatable
CouponSetting contains the coupon type, schedule, and the coupon amount for the component. If
available floor and/or ceiling may also be applied to the coupon, in a pre-determined order of precedence.
It exports serialization into and de-serialization out of byte arrays.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Fixed Income Product Customization Parameters
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description CouponSetting(Array2D fs, java.lang.String strCouponType, double dblCouponRate, double dblCouponCeilingRate, double dblCouponFloorRate)Construct the CouponSetting from the coupon schedule, coupon type, and the coupon amountCouponSetting(Array2D fs, java.lang.String strCouponType, double dblCouponRate, double dblCouponRateExtension, double dblCouponCeilingRate, double dblCouponFloorRate)Construct the CouponSetting from the coupon schedule, coupon type, the coupon rate, and its extension -
Method Summary
Modifier and Type Method Description doublecouponCeilingRate()Retrieve the Coupon Ceiling RatedoublecouponFloorRate()Retrieve the Coupon Floor RatedoublecouponRate()Retrieve the Coupon RatedoublecouponRateExtension()Retrieve the Coupon Rate Extensionjava.lang.StringcouponType()Retrieve the Coupon TypeArray2DfactorSchedule()Retrieve the Factor ScheduledoubleprocessCouponWindow(double dblCouponRate, double dblDate)Trim the component coupon if it falls outside the (optionally) specified coupon window.booleanvalidate()Validate the current object stateMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CouponSetting
public CouponSetting(Array2D fs, java.lang.String strCouponType, double dblCouponRate, double dblCouponCeilingRate, double dblCouponFloorRate)Construct the CouponSetting from the coupon schedule, coupon type, and the coupon amount- Parameters:
fs- Coupon schedulestrCouponType- Coupon TypedblCouponRate- Coupon RatedblCouponCeilingRate- Coupon Ceiling RatedblCouponFloorRate- Coupon Floor Rate
-
CouponSetting
public CouponSetting(Array2D fs, java.lang.String strCouponType, double dblCouponRate, double dblCouponRateExtension, double dblCouponCeilingRate, double dblCouponFloorRate)Construct the CouponSetting from the coupon schedule, coupon type, the coupon rate, and its extension- Parameters:
fs- Coupon schedulestrCouponType- Coupon TypedblCouponRate- Coupon RatedblCouponRateExtension- Coupon Rate ExtensiondblCouponCeilingRate- Coupon Ceiling RatedblCouponFloorRate- Coupon Floor Rate
-
-
Method Details
-
processCouponWindow
public double processCouponWindow(double dblCouponRate, double dblDate) throws java.lang.ExceptionTrim the component coupon if it falls outside the (optionally) specified coupon window. Note that trimming the coupon ceiling takes precedence over hiking the coupon floor.- Parameters:
dblCouponRate- Input Coupon RatedblDate- Input Date representing the period that the coupon belongs to- Returns:
- The "trimmed" coupon Rate
- Throws:
java.lang.Exception- Thrown if inputs are invalid
-
validate
public boolean validate()Description copied from interface:ValidatableValidate the current object state- Specified by:
validatein interfaceValidatable- Returns:
- Validation successful (true) or failed (false)
-
factorSchedule
Retrieve the Factor Schedule- Returns:
- The Factor Schedule
-
couponType
public java.lang.String couponType()Retrieve the Coupon Type- Returns:
- The Coupon Type
-
couponRate
public double couponRate()Retrieve the Coupon Rate- Returns:
- The Coupon Rate
-
couponRateExtension
public double couponRateExtension()Retrieve the Coupon Rate Extension- Returns:
- The Coupon Rate Extension
-
couponCeilingRate
public double couponCeilingRate()Retrieve the Coupon Ceiling Rate- Returns:
- The Coupon Ceiling Rate
-
couponFloorRate
public double couponFloorRate()Retrieve the Coupon Floor Rate- Returns:
- The Coupon Floor Rate
-