Package org.drip.analytics.daycount
Interface DCFCalculator
- All Known Implementing Classes:
DC1_1
,DC28_360
,DC30_360
,DC30_365
,DC30_Act
,DC30E_360
,DC30E_360_ISDA
,DC30EPLUS_360_ISDA
,DCAct_360
,DCAct_364
,DCAct_365
,DCAct_365L
,DCAct_Act
,DCAct_Act_ISDA
,DCAct_Act_UST
,DCNL_360
,DCNL_365
,DCNL_Act
public interface DCFCalculator
DCFCalculator is the stub for all the day count convention functionality. It exposes the
base/alternate day count convention names, the year-fraction and the days accrued.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Date, Cash Flow, and Cash Flow Period Measure Generation Utilities
- Package = Day Count Year Fraction Utilities
- Author:
- Lakshmi Krishnamurthy
-
Method Summary
Modifier and Type Method Description java.lang.String[]
alternateNames()
Retrieves the full set of alternate names corresponding to the DCF Calculatorjava.lang.String
baseCalculationType()
Retrieves the base calculation type corresponding to the DCF Calculatorint
daysAccrued(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar)
Calculates the number of days accrued between the two given daysdouble
yearFraction(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar)
Calculates the accrual fraction in years between 2 given days
-
Method Details
-
baseCalculationType
java.lang.String baseCalculationType()Retrieves the base calculation type corresponding to the DCF Calculator- Returns:
- Name of the base calculation type
-
alternateNames
java.lang.String[] alternateNames()Retrieves the full set of alternate names corresponding to the DCF Calculator- Returns:
- Array of alternate names
-
yearFraction
double yearFraction(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.ExceptionCalculates the accrual fraction in years between 2 given days- Parameters:
iStartDate
- Start DateiEndDate
- End DatebApplyEOMAdj
- Apply end-of-month adjustment (true)actactParams
- ActActParamsstrCalendar
- Holiday Calendar- Returns:
- Accrual Fraction in years
- Throws:
java.lang.Exception
- Thrown if the accrual fraction cannot be calculated
-
daysAccrued
int daysAccrued(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.ExceptionCalculates the number of days accrued between the two given days- Parameters:
iStartDate
- Start DateiEndDate
- End DatebApplyEOMAdj
- Apply end-of-month adjustment (true)actactParams
- ActActParamsstrCalendar
- Holiday Calendar- Returns:
- Accrual Fraction in years
- Throws:
java.lang.Exception
- Thrown if the accrual fraction cannot be calculated
-