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 int
NODE_INSIDE_SEGMENT
Node is Inside the Periodstatic int
NODE_LEFT_OF_SEGMENT
Node is to the Left of the Periodstatic int
NODE_RIGHT_OF_SEGMENT
Node is to the Right of the Period -
Method Summary
Modifier and Type Method Description int
accrualCompoundingRule()
Retrieve the Accrual Compounding Rulejava.lang.String
accrualDC()
Retrieve the Accrual Day Countdouble
accrualDCF(int iAccrualEnd)
Get the Period Accrual Day Count Fraction to an Accrual End Dateboolean
accrualEOMAdjustment()
Retrieve the Accrual EOM Adjustment Flagabstract double
baseRate(CurveSurfaceQuoteContainer csqc)
Get the Period Base Coupon Rateabstract double
basis()
Get the Period Coupon Basisjava.lang.String
calendar()
Retrieve the Calendarabstract java.lang.String
couponCurrency()
Get the Period Coupon Currencyjava.lang.String
couponDC()
Retrieve the Coupon Day Countboolean
couponDCFOffOfFreq()
Retrieve the Flag indicating whether Coupon DCF is computed off of the DCF Flagboolean
couponEOMAdjustment()
Retrieve the Coupon EOM Adjustment Flagint
dateLocation(int iDateNode)
Place the Date Node Location in Relation to the Segment Locationint
endDate()
Retrieve the Accrual End Dateint
freq()
Retrieve the Coupon Frequencydouble
fullCouponDCF()
Retrieve the Period Full Coupon DCFdouble
fullCouponRate(CurveSurfaceQuoteContainer csqc)
Get the Period Full Coupon Rateint
startDate()
Retrieve the Accrual Start Datejava.lang.String
tenor()
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
-