public enum CompoundingMethod extends Enum<CompoundingMethod> implements NamedEnum
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 and Description |
|---|
FLAT
Flat compounding applies.
|
NONE
No compounding applies.
|
SPREAD_EXCLUSIVE
Spread exclusive compounding applies.
|
STRAIGHT
Straight compounding applies, which is inclusive of the spread.
|
| Modifier and Type | Method and Description |
|---|---|
static CompoundingMethod |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static CompoundingMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompoundingMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompoundingMethod NONE
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.
public static final CompoundingMethod STRAIGHT
Compounding is based on the total of the observed rate and the spread.
Defined as "Compounding" in the ISDA 2006 definitions.
public static final CompoundingMethod FLAT
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.
public static final CompoundingMethod SPREAD_EXCLUSIVE
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.
public static CompoundingMethod[] values()
for (CompoundingMethod c : CompoundingMethod.values()) System.out.println(c);
public static CompoundingMethod valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static CompoundingMethod of(String name)
Parsing handles the mixed case form produced by toString() and
the upper and lower case variants of the enum constant name.
name - the name to parseIllegalArgumentException - if the name is not knownpublic String toString()
toString in class Enum<CompoundingMethod>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.