Package com.imsl.finance
Class DayCountBasis
java.lang.Object
com.imsl.finance.DayCountBasis
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final DayCountBasisComputations are based on the assumption of 30 days per month and 360 days per year.static final DayCountBasisComputations 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.static final DayCountBasisComputations 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.static final DayCountBasisComputations are based on the actual calendar.static final DayCountBasisComputations are based on the assumption of 30 days per month and 360 days per year.static final BasisPartComputations are based on the assumption of 30 days per month and 360 days per year.static final BasisPartComputations are based on the assumption of 365 days per year.static final BasisPartComputations are are based on the actual calendar.static final BasisPartComputations based on the assumption of 30 days per month and 360 days per year. -
Constructor Summary
ConstructorsConstructorDescriptionDayCountBasis(BasisPart monthBasis, BasisPart yearBasis) Creates a new DayCountBasis. -
Method Summary
Modifier and TypeMethodDescriptionReturns the (days in month) portion of the Day Count Basis.Returns the (days in year) portion of the Day Count Basis.voidsetEOM(boolean EOM) Specifies whether to use the End-Of-Month rule.
-
Field Details
-
BasisPartNASD
Computations based on the assumption of 30 days per month and 360 days per year. -
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
Computations are based on the assumption of 365 days per year. -
BasisPartActual
Computations are are based on the actual calendar. -
BasisNASD
Computations are based on the assumption of 30 days per month and 360 days per year.- See Also:
-
BasisActualActual
Computations are based on the actual calendar.- See Also:
-
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
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
Computations are based on the assumption of 30 days per month and 360 days per year.- See Also:
-
-
Constructor Details
-
DayCountBasis
Creates a new DayCountBasis.- Parameters:
monthBasis- aBasisPartthat contains the month basisyearBasis- aBasisPartthat 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- abooleanindicating that the End-Of-Month rule is to be used.Default: EOM =
true.
-
getMonthBasis
Returns the (days in month) portion of the Day Count Basis.- Returns:
- a
BasisPartobject which represents the month Basis for thisDayCountBasis
-
getYearBasis
Returns the (days in year) portion of the Day Count Basis.- Returns:
- a
BasisPartobject which represents the year Basis for thisDayCountBasis
-