Class DayCountBasis

java.lang.Object
com.imsl.finance.DayCountBasis

public class DayCountBasis extends Object
The Day Count Basis. Rules for computing the number of days between two dates or number of days in a year. For many securities, computations are based on rules other than on the actual calendar.
  • Field Details

    • BasisPartNASD

      public static final BasisPart BasisPartNASD
      Computations based on the assumption of 30 days per month and 360 days per year.
    • BasisPart30E360

      public static final BasisPart BasisPart30E360
      Computations are based on the assumption of 30 days per month and 360 days per year. This computes the number of days between two dates differently than BasisPartNASD for months with other than 30 days.
    • BasisPart365

      public static final BasisPart BasisPart365
      Computations are based on the assumption of 365 days per year.
    • BasisPartActual

      public static final BasisPart BasisPartActual
      Computations are are based on the actual calendar.
    • BasisNASD

      public static final DayCountBasis BasisNASD
      Computations are based on the assumption of 30 days per month and 360 days per year.
      See Also:
    • BasisActualActual

      public static final DayCountBasis BasisActualActual
      Computations are based on the actual calendar.
      See Also:
    • BasisActual360

      public static final DayCountBasis BasisActual360
      Computations are based on the number of days in a month based on the actual calendar value and the number of days, but assuming 360 days per year.
      See Also:
    • BasisActual365

      public static final DayCountBasis BasisActual365
      Computations are based on the number of days in a month based on the actual calendar value and the number of days, but assuming 365 days per year.
      See Also:
    • Basis30e360

      public static final DayCountBasis Basis30e360
      Computations are based on the assumption of 30 days per month and 360 days per year.
      See Also:
  • Constructor Details

    • DayCountBasis

      public DayCountBasis(BasisPart monthBasis, BasisPart yearBasis)
      Creates a new DayCountBasis.
      Parameters:
      monthBasis - a BasisPart that contains the month basis
      yearBasis - a BasisPart that contains the year basis
  • Method Details

    • setEOM

      public void setEOM(boolean EOM)
      Specifies whether to use the End-Of-Month rule.

      The EOM rule is only used in day count calculations of the basis type, 30/360 (NASD Superclass).

      Parameters:
      EOM - a boolean indicating that the End-Of-Month rule is to be used.

      Default: EOM = true.

    • getMonthBasis

      public BasisPart getMonthBasis()
      Returns the (days in month) portion of the Day Count Basis.
      Returns:
      a BasisPart object which represents the month Basis for this DayCountBasis
    • getYearBasis

      public BasisPart getYearBasis()
      Returns the (days in year) portion of the Day Count Basis.
      Returns:
      a BasisPart object which represents the year Basis for this DayCountBasis