Class EtdFutureTrade

    • Method Detail

      • of

        public static EtdFutureTrade of​(TradeInfo tradeInfo,
                                        EtdFutureSecurity security,
                                        double quantity,
                                        double price)
        Obtains an instance from trade information, security, quantity and price.
        Parameters:
        tradeInfo - the trade information
        security - the security that was traded
        quantity - the quantity that was traded
        price - the price that was traded
        Returns:
        the trade
      • meta

        public static EtdFutureTrade.Meta meta()
        The meta-bean for EtdFutureTrade.
        Returns:
        the meta-bean, not null
      • builder

        public static EtdFutureTrade.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public EtdFutureTrade.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getInfo

        public TradeInfo getInfo()
        Gets the additional trade information, defaulted to an empty instance.

        This allows additional information to be attached to the trade.

        Specified by:
        getInfo in interface PortfolioItem
        Specified by:
        getInfo in interface Trade
        Returns:
        the value of the property, not null
      • getSecurity

        public EtdFutureSecurity getSecurity()
        Gets the security that was traded.
        Specified by:
        getSecurity in interface EtdTrade
        Returns:
        the value of the property, not null
      • getQuantity

        public double getQuantity()
        Gets the quantity that was traded.

        This is the number of contracts that were traded. This will be positive if buying and negative if selling.

        Specified by:
        getQuantity in interface SecurityQuantity
        Returns:
        the value of the property
      • getPrice

        public double getPrice()
        Gets the price that was traded, in decimal form.

        This is the price agreed when the trade occurred.

        Specified by:
        getPrice in interface SecurityQuantityTrade
        Returns:
        the value of the property
      • toBuilder

        public EtdFutureTrade.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object