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.



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 amount
    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
  • Method Summary

    Modifier and Type Method Description
    double couponCeilingRate()
    Retrieve the Coupon Ceiling Rate
    double couponFloorRate()
    Retrieve the Coupon Floor Rate
    double couponRate()
    Retrieve the Coupon Rate
    double couponRateExtension()
    Retrieve the Coupon Rate Extension
    java.lang.String couponType()
    Retrieve the Coupon Type
    Array2D factorSchedule()
    Retrieve the Factor Schedule
    double processCouponWindow​(double dblCouponRate, double dblDate)
    Trim the component coupon if it falls outside the (optionally) specified coupon window.
    boolean validate()
    Validate the current object state

    Methods 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 schedule
      strCouponType - Coupon Type
      dblCouponRate - Coupon Rate
      dblCouponCeilingRate - Coupon Ceiling Rate
      dblCouponFloorRate - 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 schedule
      strCouponType - Coupon Type
      dblCouponRate - Coupon Rate
      dblCouponRateExtension - Coupon Rate Extension
      dblCouponCeilingRate - Coupon Ceiling Rate
      dblCouponFloorRate - Coupon Floor Rate
  • Method Details

    • processCouponWindow

      public double processCouponWindow​(double dblCouponRate, double dblDate) throws java.lang.Exception
      Trim 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 Rate
      dblDate - 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: Validatable
      Validate the current object state
      Specified by:
      validate in interface Validatable
      Returns:
      Validation successful (true) or failed (false)
    • factorSchedule

      public Array2D 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