Enum CompoundingMethod

  • All Implemented Interfaces:
    Named, NamedEnum, Serializable, Comparable<CompoundingMethod>

    public enum CompoundingMethod
    extends Enum<CompoundingMethod>
    implements NamedEnum
    A convention defining how to compound interest.

    When calculating interest, it may be necessary to apply compounding. Compound interest occurs where the basic interest is collected over one period but paid over a longer period. For example, interest may be collected every three months but only paid every year.

    For more information see this ISDA note.

    • Enum Constant Detail

      • NONE

        public static final CompoundingMethod NONE
        No compounding applies.

        This is typically used when the payment periods align with the accrual periods thus no compounding is necessary. It may also be used when there are multiple accrual periods, but they are summed rather than compounded.

      • STRAIGHT

        public static final CompoundingMethod STRAIGHT
        Straight compounding applies, which is inclusive of the spread.

        Compounding is based on the total of the observed rate and the spread.

        Defined as "Compounding" in the ISDA 2006 definitions.

      • FLAT

        public static final CompoundingMethod FLAT
        Flat compounding applies.

        For interest on the notional, known as the Basic Compounding Period Amount, compounding is based on the total of the observed rate and the spread. For interest on previously accrued interest, known as the Additional Compounding Period Amount, compounding is based only on the observed rate, excluding the spread.

        Defined as "Flat Compounding" in the ISDA 2006 definitions.

      • SPREAD_EXCLUSIVE

        public static final CompoundingMethod SPREAD_EXCLUSIVE
        Spread exclusive compounding applies.

        Compounding is based only on the observed rate, with the spread treated as simple interest.

        Defined as "Compounding treating Spread as simple interest" in the ISDA definitions.

    • Method Detail

      • values

        public static CompoundingMethod[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CompoundingMethod c : CompoundingMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CompoundingMethod valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • of

        public static CompoundingMethod of​(String name)
        Obtains an instance from the specified name.

        Parsing handles the mixed case form produced by toString() and the upper and lower case variants of the enum constant name.

        Parameters:
        name - the name to parse
        Returns:
        the type
        Throws:
        IllegalArgumentException - if the name is not known
      • toString

        public String toString()
        Returns the formatted name of the type.
        Overrides:
        toString in class Enum<CompoundingMethod>
        Returns:
        the formatted string representing the type