Package org.drip.product.params
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.
- 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 BondStream(java.util.List<CompositePeriod> lsCouponPeriod, int iFinalMaturityDate, java.lang.String strMaturityType)
Construct the BondStream instance from the list of coupon periods -
Method Summary
Modifier and Type Method Description static 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 Parametersint
finalMaturityDate()
Retrieve the Final Maturity DateCompositePeriod
firstPeriod()
Return the first Coupon periodstatic 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 ParametersCompositePeriod
lastPeriod()
Returns the final Coupon periodjava.lang.String
maturityType()
Retrieve the Maturity TypeCompositePeriod
period(int iIndex)
Retrieve the period corresponding to the given indexint
periodIndex(int iDate)
Return the period index containing the specified dateMethods inherited from class org.drip.product.rates.Stream
accrualDC, accrualEOMAdjustment, availableMeasures, basis, calendar, calibQuoteSet, cashflowCurrencySet, cashFlowPeriod, containingPeriod, coupon, couponCurrency, couponDC, couponEOMAdjustment, creditLabel, effective, firstCouponDate, floaterLabel, forwardLabel, forwardPRWC, freq, fundingForwardPRWC, fundingLabel, fundingPRWC, fxLabel, fxPRWC, govviePRWC, initialNotional, jackDDirtyPVDManifestMeasure, manifestMeasureDFMicroJack, maturity, name, notional, notional, otcFixFloatLabel, payCurrency, periods, pv, value, volatilityPRWC
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BondStream
public BondStream(java.util.List<CompositePeriod> lsCouponPeriod, int iFinalMaturityDate, java.lang.String strMaturityType) throws java.lang.ExceptionConstruct the BondStream instance from the list of coupon periods- Parameters:
lsCouponPeriod
- List of Coupon PeriodiFinalMaturityDate
- Final Maturity DatestrMaturityType
- 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 DateiEffectiveDate
- Effective DateiFinalMaturityDate
- Final Maturity DateiFirstCouponDate
- First Coupon DateiPenultimateCouponDate
- Penultimate Coupon DateiFreq
- Coupon FrequencydblCoupon
- Coupon RatestrCouponDC
- Coupon day count conventionstrAccrualDC
- Accrual day count conventiondapPay
- Pay Date Adjustment ParametersdapReset
- Reset Date Adjustment ParametersdapMaturity
- Maturity Date Adjustment ParametersdapEffective
- Effective Date Adjustment ParametersdapPeriodEnd
- Period End Date Adjustment ParametersdapAccrualEnd
- Accrual Date Adjustment ParametersdapPeriodStart
- Period Start Date Adjustment ParametersdapAccrualStart
- Accrual Start Date Adjustment ParametersstrMaturityType
- Maturity TypebPeriodsFromForward
- Generate Periods forward (True) or Backward (False)strCalendar
- Optional Holiday Calendar for Accrual CalculationsstrCurrency
- Coupon CurrencyfloaterLabel
- The Floater LabelcreditLabel
- 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 DateiEffectiveDate
- Effective DateiFinalMaturityDate
- Final Maturity DateiFirstCouponDate
- First Coupon DateiInterestAccrualStartDate
- Interest Accrual Start DateiFreq
- Coupon FrequencydblCoupon
- Coupon RatestrCouponDC
- Coupon day count conventionstrAccrualDC
- Accrual day count conventiondapPay
- Pay Date Adjustment ParametersdapReset
- Reset Date Adjustment ParametersdapMaturity
- Maturity Date Adjustment ParametersdapEffective
- Effective Date Adjustment ParametersdapPeriodEnd
- Period End Date Adjustment ParametersdapAccrualEnd
- Accrual Date Adjustment ParametersdapPeriodStart
- Period Start Date Adjustment ParametersdapAccrualStart
- Accrual Start Date Adjustment ParametersstrMaturityType
- Maturity TypebPeriodsFromForward
- Generate Periods forward (True) or Backward (False)strCalendar
- Optional Holiday Calendar for accrual calculationsstrCurrency
- Coupon CurrencyfloaterLabel
- The Floater LabelcreditLabel
- The Credit Label- Returns:
- The BondStream Instance
-
firstPeriod
Return the first Coupon period- Returns:
- The first Coupon period
-
lastPeriod
Returns the final Coupon period- Returns:
- The final Coupon period
-
periodIndex
public int periodIndex(int iDate) throws java.lang.ExceptionReturn 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
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
-