Class ValueType

  • All Implemented Interfaces:
    Named, java.io.Serializable, java.lang.Comparable<ValueType>

    public final class ValueType
    extends TypedString<ValueType>
    The type of a value.

    The market data system contains many different kinds of value, and this type can be used to identify them.

    For example, constants are provided for common financial concepts, such as discount factors, zero rates and year fractions. The set of types is fully extensible.

    See Also:
    Serialized Form
    • Field Detail

      • UNKNOWN

        public static final ValueType UNKNOWN
        Type used when the meaning of each value is not known - 'Unknown'.
      • YEAR_FRACTION

        public static final ValueType YEAR_FRACTION
        Type used when each value is a year fraction relative to a base date - 'YearFraction'.
      • MONTHS

        public static final ValueType MONTHS
        Type used when each value is the number of months relative to a base month - 'Months'.
      • ZERO_RATE

        public static final ValueType ZERO_RATE
        Type used when each value is a zero rate - 'ZeroRate'.
      • FORWARD_RATE

        public static final ValueType FORWARD_RATE
        Type used when each value is a forward rate - 'ForwardRate'.
      • DISCOUNT_FACTOR

        public static final ValueType DISCOUNT_FACTOR
        Type used when each value is a discount factor - 'DiscountFactor'.
      • PRICE_INDEX

        public static final ValueType PRICE_INDEX
        Type used when each value is a price index, as used for inflation products - 'PriceIndex'.
      • RECOVERY_RATE

        public static final ValueType RECOVERY_RATE
        Type used when each value is a recovery rate - 'RecoveryRate'.
      • BLACK_VOLATILITY

        public static final ValueType BLACK_VOLATILITY
        Type used when each value is a Black model implied volatility - 'BlackVolatility'.
      • NORMAL_VOLATILITY

        public static final ValueType NORMAL_VOLATILITY
        Type used when each value is a Normal (Bachelier) model implied volatility - 'NormalVolatility'.
      • LOCAL_VOLATILITY

        public static final ValueType LOCAL_VOLATILITY
        Type used when each value is a local volatility - 'LocalVolatility'.
      • PRICE

        public static final ValueType PRICE
        Type used when each value is a Price - 'Price'.
      • STRIKE

        public static final ValueType STRIKE
        Type used when each value is a strike - 'Strike'.
      • SIMPLE_MONEYNESS

        public static final ValueType SIMPLE_MONEYNESS
        Type used when each value is simple-moneyness, i.e. the value refers to strike minus forward - 'SimpleMoneyness'.
      • LOG_MONEYNESS

        public static final ValueType LOG_MONEYNESS
        Type used when each value is log-moneyness, i.e. the value refers to log of strike divided by forward - 'LogMoneyness'.
      • SABR_ALPHA

        public static final ValueType SABR_ALPHA
        Type used when each value is the SABR alpha parameter - 'SabrAlpha'.
      • SABR_BETA

        public static final ValueType SABR_BETA
        Type used when each value is the SABR beta parameter - 'SabrBeta'.
      • SABR_RHO

        public static final ValueType SABR_RHO
        Type used when each value is the SABR rho parameter - 'SabrRho'.
      • SABR_NU

        public static final ValueType SABR_NU
        Type used when each value is the SABR nu parameter - 'SabrNu'.
      • RISK_REVERSAL

        public static final ValueType RISK_REVERSAL
        Type used when each value is a risk reversal - 'RiskReversal'.
      • STRANGLE

        public static final ValueType STRANGLE
        Type used when each value is a strangle - 'Strangle'.
    • Method Detail

      • of

        public static ValueType of​(java.lang.String name)
        Obtains an instance from the specified name.

        Value types must only contains the characters A-Z, a-z, 0-9 and -.

        Parameters:
        name - the name of the field
        Returns:
        a field with the specified name
      • checkEquals

        public void checkEquals​(ValueType other,
                                java.lang.String exceptionPrefix)
        Checks that this instance equals the specified instance.

        This returns normally if they are equal. Otherwise, an exception is thrown.

        Parameters:
        other - the instance to check against
        exceptionPrefix - the exception prefix