public class CashflowPeriod extends Period
NULL_SER_STRING, VERSION
Constructor and Description |
---|
CashflowPeriod(byte[] ab)
De-serialization of CashflowPeriod from byte stream
|
CashflowPeriod(double dblStart,
double dblEnd,
double dblAccrualStart,
double dblAccrualEnd,
double dblPay,
double dblReset,
int iFreq,
double dblDCF,
java.lang.String strCouponDC,
boolean bApplyCpnEOMAdj,
java.lang.String strAccrualDC,
boolean bApplyAccEOMAdj,
double dblMaturity,
java.lang.String strCalendar)
Construct a CashflowPeriod instance from the specified dates
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<CashflowPeriod> |
GeneratePeriodsBackward(double dblEffective,
double dblMaturityIn,
DateAdjustParams dapEffective,
DateAdjustParams dapMaturity,
DateAdjustParams dapPeriodStart,
DateAdjustParams dapPeriodEnd,
DateAdjustParams dapAccrualStart,
DateAdjustParams dapAccrualEnd,
DateAdjustParams dapPay,
DateAdjustParams dapReset,
int iFreq,
java.lang.String strCouponDC,
boolean bApplyCpnEOMAdj,
java.lang.String strAccrualDC,
boolean bApplyAccEOMAdj,
boolean bFullStub,
boolean bMergeLeadingPeriods,
boolean bCouponDCFOffOfFreq,
java.lang.String strCalendar)
Generate the period list backward starting from the end.
|
static java.util.List<CashflowPeriod> |
GeneratePeriodsForward(double dblEffective,
double dblMaturity,
DateAdjustParams dapEffective,
DateAdjustParams dapMaturity,
DateAdjustParams dapPeriodStart,
DateAdjustParams dapPeriodEnd,
DateAdjustParams dapAccrualStart,
DateAdjustParams dapAccrualEnd,
DateAdjustParams dapPay,
DateAdjustParams dapReset,
int iFreq,
java.lang.String strCouponDC,
boolean bApplyCpnEOMAdj,
java.lang.String strAccrualDC,
boolean bApplyAccEOMAdj,
boolean bCouponDCFOffOfFreq,
java.lang.String strCalendar)
Generate the period list forward starting from the start.
|
double |
getAccrualDCF(double dblAccrualEnd)
Get the period Accrual Day Count Fraction to an accrual end date
|
double |
getResetDate()
Return the period Reset Date
|
static java.util.List<CashflowPeriod> |
GetSinglePeriod(double dblEffective,
double dblMaturity,
java.lang.String strCalendar)
Generate a single Cash Flow period between the effective and the maturity dates
|
static CashflowPeriod |
MergeCashFlowPeriods(CashflowPeriod periodLeft,
CashflowPeriod periodRight)
Merge the left and right Cash Flow periods onto a bigger Cash Flow period
|
compareTo, contains, deserialize, getAccrualEndDate, getAccrualStartDate, getCouponDCF, getEndDate, getFieldDelimiter, getObjectTrailer, getPayDate, getStartDate, hashCode, serialize, setAccrualStartDate, setPayDate
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter
public CashflowPeriod(double dblStart, double dblEnd, double dblAccrualStart, double dblAccrualEnd, double dblPay, double dblReset, int iFreq, double dblDCF, java.lang.String strCouponDC, boolean bApplyCpnEOMAdj, java.lang.String strAccrualDC, boolean bApplyAccEOMAdj, double dblMaturity, java.lang.String strCalendar) throws java.lang.Exception
dblStart
- Period Start DatedblEnd
- Period End DatedblAccrualStart
- Period Accrual Start DatedblAccrualEnd
- Period Accrual End DatedblPay
- Period Pay DatedblReset
- Period Reset DateiFreq
- FrequencydblDCF
- Full Period Day Count FractionstrCouponDC
- Coupon day countbApplyCpnEOMAdj
- Apply end-of-month adjustment to the coupon periodsstrAccrualDC
- Accrual Day countbApplyAccEOMAdj
- Apply end-of-month adjustment to the accrual periodsdblMaturity
- Maturity datestrCalendar
- Holiday Calendarjava.lang.Exception
- Thrown if the inputs are invalidpublic CashflowPeriod(byte[] ab) throws java.lang.Exception
ab
- Byte streamjava.lang.Exception
- Thrown if cannot properly de-serialize CashflowPeriodpublic static final CashflowPeriod MergeCashFlowPeriods(CashflowPeriod periodLeft, CashflowPeriod periodRight)
periodLeft
- Left Cash Flow PeriodperiodRight
- Right Cash Flow Periodpublic static final java.util.List<CashflowPeriod> GeneratePeriodsBackward(double dblEffective, double dblMaturityIn, DateAdjustParams dapEffective, DateAdjustParams dapMaturity, DateAdjustParams dapPeriodStart, DateAdjustParams dapPeriodEnd, DateAdjustParams dapAccrualStart, DateAdjustParams dapAccrualEnd, DateAdjustParams dapPay, DateAdjustParams dapReset, int iFreq, java.lang.String strCouponDC, boolean bApplyCpnEOMAdj, java.lang.String strAccrualDC, boolean bApplyAccEOMAdj, boolean bFullStub, boolean bMergeLeadingPeriods, boolean bCouponDCFOffOfFreq, java.lang.String strCalendar)
dblEffective
- Effective datedblMaturityIn
- Maturity datedapEffective
- Effective date Date Adjust ParametersdapMaturity
- Maturity date Date Adjust ParametersdapPeriodStart
- Period Start date Date Adjust ParametersdapPeriodEnd
- Period End date Date Adjust ParametersdapAccrualStart
- Accrual Start date Date Adjust ParametersdapAccrualEnd
- Accrual End date Date Adjust ParametersdapPay
- Pay date Date Adjust ParametersdapReset
- Reset date Date Adjust ParametersiFreq
- FrequencystrCouponDC
- Coupon day countbApplyCpnEOMAdj
- Apply end-of-month adjustment to the coupon periodsstrAccrualDC
- Accrual day countbApplyAccEOMAdj
- Apply end-of-month adjustment to the accrual periodsbFullStub
- TRUE - generates full first stubbMergeLeadingPeriods
- - TRUE - Merge the Front 2 coupon periodsbCouponDCFOffOfFreq
- TRUE => Full coupon DCF = 1 / Frequency; FALSE => Full Coupon DCF
determined from Coupon DCF and the coupon accrual periodstrCalendar
- Optional Holiday Calendar for accrualpublic static final java.util.List<CashflowPeriod> GeneratePeriodsForward(double dblEffective, double dblMaturity, DateAdjustParams dapEffective, DateAdjustParams dapMaturity, DateAdjustParams dapPeriodStart, DateAdjustParams dapPeriodEnd, DateAdjustParams dapAccrualStart, DateAdjustParams dapAccrualEnd, DateAdjustParams dapPay, DateAdjustParams dapReset, int iFreq, java.lang.String strCouponDC, boolean bApplyCpnEOMAdj, java.lang.String strAccrualDC, boolean bApplyAccEOMAdj, boolean bCouponDCFOffOfFreq, java.lang.String strCalendar)
dblEffective
- Effective datedblMaturity
- Maturity datedapEffective
- Effective date Date Adjust ParametersdapMaturity
- Maturity date Date Adjust ParametersdapPeriodStart
- Period Start date Date Adjust ParametersdapPeriodEnd
- Period End date Date Adjust ParametersdapAccrualStart
- Accrual Start date Date Adjust ParametersdapAccrualEnd
- Accrual End date Date Adjust ParametersdapPay
- Pay date Date Adjust ParametersdapReset
- Reset date Date Adjust ParametersiFreq
- FrequencystrCouponDC
- Coupon day countbApplyCpnEOMAdj
- Apply end-of-month adjustment to the coupon periodsstrAccrualDC
- Accrual day countbApplyAccEOMAdj
- Apply end-of-month adjustment to the accrual periodsstrCalendar
- Optional Holiday Calendar for accrualpublic static final java.util.List<CashflowPeriod> GetSinglePeriod(double dblEffective, double dblMaturity, java.lang.String strCalendar)
dblEffective
- Effective datedblMaturity
- Maturity datestrCalendar
- Optional Holiday Calendar for accrualpublic double getResetDate()
Period
getResetDate
in class Period
public double getAccrualDCF(double dblAccrualEnd) throws java.lang.Exception
Period
getAccrualDCF
in class Period
dblAccrualEnd
- Accrual End Datejava.lang.Exception