Enum 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

    • 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())
        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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - 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.

        name - the name to parse
        the type
        IllegalArgumentException - if the name is not known