Package org.drip.analytics.cashflow
Class ComposableUnitPeriod
java.lang.Object
org.drip.analytics.cashflow.ComposableUnitPeriod
- Direct Known Subclasses:
ComposableUnitFixedPeriod,ComposableUnitFloatingPeriod
public abstract class ComposableUnitPeriod
extends java.lang.Object
ComposableUnitPeriod represents the Cash Flow Periods' Composable Unit Period Details. Currently it
holds the Accrual Start Date, the Accrual End Date, the Fixed Coupon, the Basis Spread, the Coupon and the
Accrual Day Counts, as well as the EOM Adjustment Flags.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Date, Cash Flow, and Cash Flow Period Measure Generation Utilities
- Package = Unit and Composite Cash Flow Periods
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static intNODE_INSIDE_SEGMENTNode is Inside the Periodstatic intNODE_LEFT_OF_SEGMENTNode is to the Left of the Periodstatic intNODE_RIGHT_OF_SEGMENTNode is to the Right of the Period -
Method Summary
Modifier and Type Method Description intaccrualCompoundingRule()Retrieve the Accrual Compounding Rulejava.lang.StringaccrualDC()Retrieve the Accrual Day CountdoubleaccrualDCF(int iAccrualEnd)Get the Period Accrual Day Count Fraction to an Accrual End DatebooleanaccrualEOMAdjustment()Retrieve the Accrual EOM Adjustment Flagabstract doublebaseRate(CurveSurfaceQuoteContainer csqc)Get the Period Base Coupon Rateabstract doublebasis()Get the Period Coupon Basisjava.lang.Stringcalendar()Retrieve the Calendarabstract java.lang.StringcouponCurrency()Get the Period Coupon Currencyjava.lang.StringcouponDC()Retrieve the Coupon Day CountbooleancouponDCFOffOfFreq()Retrieve the Flag indicating whether Coupon DCF is computed off of the DCF FlagbooleancouponEOMAdjustment()Retrieve the Coupon EOM Adjustment FlagintdateLocation(int iDateNode)Place the Date Node Location in Relation to the Segment LocationintendDate()Retrieve the Accrual End Dateintfreq()Retrieve the Coupon FrequencydoublefullCouponDCF()Retrieve the Period Full Coupon DCFdoublefullCouponRate(CurveSurfaceQuoteContainer csqc)Get the Period Full Coupon RateintstartDate()Retrieve the Accrual Start Datejava.lang.Stringtenor()Convert the Coupon Frequency into a TenorMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
NODE_LEFT_OF_SEGMENT
public static final int NODE_LEFT_OF_SEGMENTNode is to the Left of the Period- See Also:
- Constant Field Values
-
NODE_INSIDE_SEGMENT
public static final int NODE_INSIDE_SEGMENTNode is Inside the Period- See Also:
- Constant Field Values
-
NODE_RIGHT_OF_SEGMENT
public static final int NODE_RIGHT_OF_SEGMENTNode is to the Right of the Period- See Also:
- Constant Field Values
-
-
Method Details
-
startDate
public int startDate()Retrieve the Accrual Start Date- Returns:
- The Accrual Start Date
-
endDate
public int endDate()Retrieve the Accrual End Date- Returns:
- The Accrual End Date
-
freq
public int freq()Retrieve the Coupon Frequency- Returns:
- The Coupon Frequency
-
couponDC
public java.lang.String couponDC()Retrieve the Coupon Day Count- Returns:
- The Coupon Day Count
-
couponEOMAdjustment
public boolean couponEOMAdjustment()Retrieve the Coupon EOM Adjustment Flag- Returns:
- The Coupon EOM Adjustment Flag
-
accrualDC
public java.lang.String accrualDC()Retrieve the Accrual Day Count- Returns:
- The Accrual Day Count
-
accrualEOMAdjustment
public boolean accrualEOMAdjustment()Retrieve the Accrual EOM Adjustment Flag- Returns:
- The Accrual EOM Adjustment Flag
-
couponDCFOffOfFreq
public boolean couponDCFOffOfFreq()Retrieve the Flag indicating whether Coupon DCF is computed off of the DCF Flag- Returns:
- true - The Flag indicating whether Coupon DCF is computed off of the DCF Flag
-
calendar
public java.lang.String calendar()Retrieve the Calendar- Returns:
- The Calendar
-
accrualCompoundingRule
public int accrualCompoundingRule()Retrieve the Accrual Compounding Rule- Returns:
- The Accrual Compounding Rule
-
fullCouponDCF
public double fullCouponDCF()Retrieve the Period Full Coupon DCF- Returns:
- The Period Full Coupon DCF
-
tenor
public java.lang.String tenor()Convert the Coupon Frequency into a Tenor- Returns:
- The Coupon Frequency converted into a Tenor
-
dateLocation
public int dateLocation(int iDateNode)Place the Date Node Location in Relation to the Segment Location- Parameters:
iDateNode- The Node Ordinate- Returns:
- One of NODE_LEFT_OF_SEGMENT, NODE_RIGHT_OF_SEGMENT, or NODE_INSIDE_SEGMENT
-
accrualDCF
public double accrualDCF(int iAccrualEnd) throws java.lang.ExceptionGet the Period Accrual Day Count Fraction to an Accrual End Date- Parameters:
iAccrualEnd- Accrual End Date- Returns:
- The Accrual DCF
- Throws:
java.lang.Exception- Thrown if Inputs are Invalid, or if the Date does not lie within the Period
-
fullCouponRate
Get the Period Full Coupon Rate- Parameters:
csqc- The Market Curve and Surface- Returns:
- The Period Full Coupon Rate
- Throws:
java.lang.Exception- Thrown if the Full Coupon Rate cannot be calculated
-
baseRate
Get the Period Base Coupon Rate- Parameters:
csqc- The Market Curve and Surface- Returns:
- The Period Base Coupon Rate
- Throws:
java.lang.Exception- Thrown if the base Coupon Rate cannot be calculated
-
basis
public abstract double basis()Get the Period Coupon Basis- Returns:
- The Period Coupon Basis
-
couponCurrency
public abstract java.lang.String couponCurrency()Get the Period Coupon Currency- Returns:
- The Period Coupon Currency
-