Class EtdVariant

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class EtdVariant
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    The variant of an exchange traded derivative (ETD).

    Most ETDs are monthly, where there is one expiry date per month, but a few are issued weekly or daily.

    A special category of ETD are flex futures and options. These have additional contract flexibility, with a settlement type and option type.

    See Also:
    Serialized Form
    • Field Detail

      • MONTHLY

        public static final EtdVariant MONTHLY
        The standard Monthly type.
    • Method Detail

      • ofMonthly

        public static EtdVariant ofMonthly()
        The standard monthly ETD.
        the variant
      • ofWeekly

        public static EtdVariant ofWeekly​(int week)
        The standard weekly ETD.
        week - the week number
        the variant
      • ofDaily

        public static EtdVariant ofDaily​(int dayOfMonth)
        The standard daily ETD.
        dayOfMonth - the day-of-month
        the variant
      • ofFlexFuture

        public static EtdVariant ofFlexFuture​(int dayOfMonth,
                                              EtdSettlementType settlementType)
        The flex future.
        dayOfMonth - the day-of-month
        settlementType - the settlement type
        the variant
      • ofFlexOption

        public static EtdVariant ofFlexOption​(int dayOfMonth,
                                              EtdSettlementType settlementType,
                                              EtdOptionType optionType)
        The flex option.
        dayOfMonth - the day-of-month
        settlementType - the settlement type
        optionType - the option type
        the variant
      • isFlex

        public boolean isFlex()
        Checks if the variant is a Flex Future or Flex Option.
        true if this is a Flex Future or Flex Option
      • getCode

        public String getCode()
        Gets the short code that describes the variant.

        This is an empty string for Monthly, the week number prefixed by 'W' for Weekly, the day number for daily, with a suffix of the settlement type and option type codes.

        the short code
      • meta

        public static org.joda.beans.MetaBean meta()
        The meta-bean for EtdVariant.
        the meta-bean, not null
      • metaBean

        public org.joda.beans.MetaBean metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getType

        public EtdExpiryType getType()
        Gets the type of ETD - Monthly, Weekly or Daily.

        Flex Futures and Options are always Daily.

        the value of the property, not null
      • getDateCode

        public OptionalInt getDateCode()
        Gets the optional date code, populated for Weekly and Daily.

        This will be the week number for Weekly and the day-of-week for Daily.

        the optional value of the property, not null
      • getSettlementType

        public Optional<EtdSettlementType> getSettlementType()
        Gets the optional settlement type, such as 'Cash' or 'Physical', populated for Flex Futures and Flex Options.
        the optional value of the property, not null
      • getOptionType

        public Optional<EtdOptionType> getOptionType()
        Gets the optional option type, 'American' or 'European', populated for Flex Options.
        the optional value of the property, not null
      • hashCode

        public int hashCode()
        hashCode in class Object