Package org.drip.analytics.daycount
Class DCAct_Act_UST
java.lang.Object
org.drip.analytics.daycount.DCAct_Act_UST
- All Implemented Interfaces:
DCFCalculator
public class DCAct_Act_UST extends java.lang.Object implements DCFCalculator
DCAct_Act_UST implements the US Treasury Bond Act/Act Day Count Convention.
- 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
-
Constructor Summary
Constructors Constructor Description DCAct_Act_UST()
Empty DCAct_Act_UST constructor -
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 daysMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DCAct_Act_UST
public DCAct_Act_UST()Empty DCAct_Act_UST constructor
-
-
Method Details
-
baseCalculationType
public java.lang.String baseCalculationType()Description copied from interface:DCFCalculator
Retrieves the base calculation type corresponding to the DCF Calculator- Specified by:
baseCalculationType
in interfaceDCFCalculator
- Returns:
- Name of the base calculation type
-
alternateNames
public java.lang.String[] alternateNames()Description copied from interface:DCFCalculator
Retrieves the full set of alternate names corresponding to the DCF Calculator- Specified by:
alternateNames
in interfaceDCFCalculator
- Returns:
- Array of alternate names
-
yearFraction
public double yearFraction(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.ExceptionDescription copied from interface:DCFCalculator
Calculates the accrual fraction in years between 2 given days- Specified by:
yearFraction
in interfaceDCFCalculator
- 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
public int daysAccrued(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.ExceptionDescription copied from interface:DCFCalculator
Calculates the number of days accrued between the two given days- Specified by:
daysAccrued
in interfaceDCFCalculator
- 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
-