Class BondStream

java.lang.Object
org.drip.product.rates.Stream
org.drip.product.params.BondStream

public class BondStream
extends Stream
BondStream is the place-holder for the bond period generation parameters. Contains the bond date adjustment parameters for period start/end, period accrual start/end, effective, maturity, pay and reset, first coupon date, and interest accrual start date. It exports serialization into and de-serialization out of byte arrays.



Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • BondStream

      public BondStream​(java.util.List<CompositePeriod> lsCouponPeriod, int iFinalMaturityDate, java.lang.String strMaturityType) throws java.lang.Exception
      Construct the BondStream instance from the list of coupon periods
      Parameters:
      lsCouponPeriod - List of Coupon Period
      iFinalMaturityDate - Final Maturity Date
      strMaturityType - Maturity Type
      Throws:
      java.lang.Exception - Thrown if Inputs are invalid
  • Method Details

    • FromFirstPenultimateCouponDate

      public static final BondStream FromFirstPenultimateCouponDate​(int iMaturityDate, int iEffectiveDate, int iFinalMaturityDate, int iFirstCouponDate, int iPenultimateCouponDate, int iFreq, double dblCoupon, java.lang.String strCouponDC, java.lang.String strAccrualDC, DateAdjustParams dapPay, DateAdjustParams dapReset, DateAdjustParams dapMaturity, DateAdjustParams dapEffective, DateAdjustParams dapPeriodEnd, DateAdjustParams dapAccrualEnd, DateAdjustParams dapPeriodStart, DateAdjustParams dapAccrualStart, java.lang.String strMaturityType, boolean bPeriodsFromForward, java.lang.String strCalendar, java.lang.String strCurrency, FloaterLabel floaterLabel, EntityCDSLabel creditLabel)
      Construct an Instance of BondStream from the First/Penultimate Dates using the specified Parameters
      Parameters:
      iMaturityDate - Maturity Date
      iEffectiveDate - Effective Date
      iFinalMaturityDate - Final Maturity Date
      iFirstCouponDate - First Coupon Date
      iPenultimateCouponDate - Penultimate Coupon Date
      iFreq - Coupon Frequency
      dblCoupon - Coupon Rate
      strCouponDC - Coupon day count convention
      strAccrualDC - Accrual day count convention
      dapPay - Pay Date Adjustment Parameters
      dapReset - Reset Date Adjustment Parameters
      dapMaturity - Maturity Date Adjustment Parameters
      dapEffective - Effective Date Adjustment Parameters
      dapPeriodEnd - Period End Date Adjustment Parameters
      dapAccrualEnd - Accrual Date Adjustment Parameters
      dapPeriodStart - Period Start Date Adjustment Parameters
      dapAccrualStart - Accrual Start Date Adjustment Parameters
      strMaturityType - Maturity Type
      bPeriodsFromForward - Generate Periods forward (True) or Backward (False)
      strCalendar - Optional Holiday Calendar for Accrual Calculations
      strCurrency - Coupon Currency
      floaterLabel - The Floater Label
      creditLabel - The Credit Label
      Returns:
      The BondStream Instance
    • Create

      public static final BondStream Create​(int iMaturityDate, int iEffectiveDate, int iFinalMaturityDate, int iFirstCouponDate, int iInterestAccrualStartDate, int iFreq, double dblCoupon, java.lang.String strCouponDC, java.lang.String strAccrualDC, DateAdjustParams dapPay, DateAdjustParams dapReset, DateAdjustParams dapMaturity, DateAdjustParams dapEffective, DateAdjustParams dapPeriodEnd, DateAdjustParams dapAccrualEnd, DateAdjustParams dapPeriodStart, DateAdjustParams dapAccrualStart, java.lang.String strMaturityType, boolean bPeriodsFromForward, java.lang.String strCalendar, java.lang.String strCurrency, FloaterLabel floaterLabel, EntityCDSLabel creditLabel)
      Construct and Instance of BondStream from the specified Parameters
      Parameters:
      iMaturityDate - Maturity Date
      iEffectiveDate - Effective Date
      iFinalMaturityDate - Final Maturity Date
      iFirstCouponDate - First Coupon Date
      iInterestAccrualStartDate - Interest Accrual Start Date
      iFreq - Coupon Frequency
      dblCoupon - Coupon Rate
      strCouponDC - Coupon day count convention
      strAccrualDC - Accrual day count convention
      dapPay - Pay Date Adjustment Parameters
      dapReset - Reset Date Adjustment Parameters
      dapMaturity - Maturity Date Adjustment Parameters
      dapEffective - Effective Date Adjustment Parameters
      dapPeriodEnd - Period End Date Adjustment Parameters
      dapAccrualEnd - Accrual Date Adjustment Parameters
      dapPeriodStart - Period Start Date Adjustment Parameters
      dapAccrualStart - Accrual Start Date Adjustment Parameters
      strMaturityType - Maturity Type
      bPeriodsFromForward - Generate Periods forward (True) or Backward (False)
      strCalendar - Optional Holiday Calendar for accrual calculations
      strCurrency - Coupon Currency
      floaterLabel - The Floater Label
      creditLabel - The Credit Label
      Returns:
      The BondStream Instance
    • firstPeriod

      public CompositePeriod firstPeriod()
      Return the first Coupon period
      Returns:
      The first Coupon period
    • lastPeriod

      public CompositePeriod lastPeriod()
      Returns the final Coupon period
      Returns:
      The final Coupon period
    • periodIndex

      public int periodIndex​(int iDate) throws java.lang.Exception
      Return the period index containing the specified date
      Parameters:
      iDate - Date input
      Returns:
      Period index containing the date
      Throws:
      java.lang.Exception - Thrown if the input date not in the period set range
    • period

      public CompositePeriod period​(int iIndex)
      Retrieve the period corresponding to the given index
      Parameters:
      iIndex - Period index
      Returns:
      Period object corresponding to the input index
    • maturityType

      public java.lang.String maturityType()
      Retrieve the Maturity Type
      Returns:
      The Maturity Type
    • finalMaturityDate

      public int finalMaturityDate()
      Retrieve the Final Maturity Date
      Returns:
      The Final Maturity Date