Enum FixedCouponBondYieldConvention
- java.lang.Object
-
- java.lang.Enum<FixedCouponBondYieldConvention>
-
- com.opengamma.strata.product.bond.FixedCouponBondYieldConvention
-
- All Implemented Interfaces:
Named,NamedEnum,Serializable,Comparable<FixedCouponBondYieldConvention>
public enum FixedCouponBondYieldConvention extends Enum<FixedCouponBondYieldConvention> implements NamedEnum
A convention defining accrued interest calculation type for a bond security.Yield of a bond security is a conventional number representing the internal rate of return of standardized cash flows. When calculating accrued interest, it is necessary to use a formula specific to each yield convention. Accordingly, the computation of price, convexity and duration from the yield should be based on this yield convention.
References: "Bond Pricing", OpenGamma Documentation 5, Version 2.0, May 2013
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DE_BONDSGerman bonds.GB_BUMP_DMOUK BUMP/DMO method.JP_SIMPLEJapan simple yield.US_STREETUS street.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FixedCouponBondYieldConventionof(String name)Obtains an instance from the specified name.StringtoString()Returns the formatted name of the type.static FixedCouponBondYieldConventionvalueOf(String name)Returns the enum constant of this type with the specified name.static FixedCouponBondYieldConvention[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GB_BUMP_DMO
public static final FixedCouponBondYieldConvention GB_BUMP_DMO
UK BUMP/DMO method.
-
US_STREET
public static final FixedCouponBondYieldConvention US_STREET
US street.
-
DE_BONDS
public static final FixedCouponBondYieldConvention DE_BONDS
German bonds.
-
JP_SIMPLE
public static final FixedCouponBondYieldConvention JP_SIMPLE
Japan simple yield.
-
-
Method Detail
-
values
public static FixedCouponBondYieldConvention[] 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 (FixedCouponBondYieldConvention c : FixedCouponBondYieldConvention.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FixedCouponBondYieldConvention 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 nameNullPointerException- if the argument is null
-
of
public static FixedCouponBondYieldConvention 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:
toStringin classEnum<FixedCouponBondYieldConvention>- Returns:
- the formatted string representing the type
-
-