Package tech.corefinance.product.enums
Enum Class InterestDayInYear
- All Implemented Interfaces:
Serializable,Comparable<InterestDayInYear>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionActual ISDA:
Calculates the interest daily by counting the number of days in the calendar and also considers leap years.Actual/360 is a day count convention that counts the actual number of days in each month, but deems each year to be 360 days.
Formula:
Interest = AnnualInterestRate * OutstandingPrincipalBalance/360 * NumberOfDaysInTheTargetMonth
Let’s consider a loan with the following terms.
Loan amount : USD 1000
Interest rate: 10% per year
Number of installments: 5
Interest expected for one month with 28 days: 10%* 1000/360 * 28 = USD 7.78
Interest expected for one month with 31 days: 10%* 1000/360 * 31 = USD 8.61The Actual/365 Fixed is a day count convention that counts the actual number of days in each month, but deems each year to be 365 days.The 30E/360 ISDA day count convention deems all months to be 30 days in length and each year to be 360 days. -
Method Summary
Modifier and TypeMethodDescriptionstatic InterestDayInYearReturns the enum constant of this class with the specified name.static InterestDayInYear[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIXED_365_DAYS
The Actual/365 Fixed is a day count convention that counts the actual number of days in each month, but deems each year to be 365 days. It applies in leap years as well as in normal years.
Formula:
Interest = AnnualInterestRate * OutstandingPrincipalBalance/365 * NumberOfDaysInTheTargetMonth
Let’s consider a loan with the following terms.
Loan amount : USD 1000
Interest rate: 10% per year
Number of installments: 5
Interest expected for one month with 30 days: 10%* 1000/365 * 30 = USD 8.22
Interest expected for one month with 31 days: 10%* 1000/365 * 31 = USD 8.49 -
FIXED_360_DAYS
Actual/360 is a day count convention that counts the actual number of days in each month, but deems each year to be 360 days.
Formula:
Interest = AnnualInterestRate * OutstandingPrincipalBalance/360 * NumberOfDaysInTheTargetMonth
Let’s consider a loan with the following terms.
Loan amount : USD 1000
Interest rate: 10% per year
Number of installments: 5
Interest expected for one month with 28 days: 10%* 1000/360 * 28 = USD 7.78
Interest expected for one month with 31 days: 10%* 1000/360 * 31 = USD 8.61 -
ACTUAL_ISDA
Actual ISDA:
Calculates the interest daily by counting the number of days in the calendar and also considers leap years. -
GERMAN_30E_360ISDA
The 30E/360 ISDA day count convention deems all months to be 30 days in length and each year to be 360 days.
With this method, the interest accrues at a daily interest rate equal to 1/360th of the interest rate, but for each full month is deemed to accrue for 30 days, regardless whether the month has 28, 29, 30, or 31 days.
In all cases, with this day count convention, the total number of days in a year will always be 360.
Formula:
Interest = AnnualInterestRate * OutstandingPrincipalBalance/360 * 30
Let’s consider a loan with the following terms.
Loan amount : USD 1000
Interest rate: 10% per year
Number of installments: 5
Interest expected for one month with 28 days: 10%* 1000/360 * 30 = USD 8.33
Interest expected for one month with 31 days: 10%* 1000/360 * 30 = USD 8.33
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-