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.

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 Calculator
    java.lang.String baseCalculationType()
    Retrieves the base calculation type corresponding to the DCF Calculator
    int daysAccrued​(int iStartDate, int iEndDate, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar)
    Calculates the number of days accrued between the two given days
    double 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.Exception
      Calculates the accrual fraction in years between 2 given days
      Parameters:
      iStartDate - Start Date
      iEndDate - End Date
      bApplyEOMAdj - Apply end-of-month adjustment (true)
      actactParams - ActActParams
      strCalendar - 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.Exception
      Calculates the number of days accrued between the two given days
      Parameters:
      iStartDate - Start Date
      iEndDate - End Date
      bApplyEOMAdj - Apply end-of-month adjustment (true)
      actactParams - ActActParams
      strCalendar - Holiday Calendar
      Returns:
      Accrual Fraction in years
      Throws:
      java.lang.Exception - Thrown if the accrual fraction cannot be calculated