Class TradedPrice

  • All Implemented Interfaces:
    java.io.Serializable, Bean, ImmutableBean

    public final class TradedPrice
    extends java.lang.Object
    implements ImmutableBean, java.io.Serializable
    The traded price of a security-based trade.

    When a trade in a security occurs there is an agreed price and trade date. This class combines these two pieces of information.

    Once the trade has occurred, end of day processing typically aggregates the trades into positions. As a position combines multiple trades at different prices, the information in this class does not apply.

    Price

    Strata uses decimal prices in the trade model, pricers and market data. See the individual security types for more details.
    See Also:
    Serialized Form
    • Method Detail

      • of

        public static TradedPrice of​(java.time.LocalDate tradeDate,
                                     double price)
        Obtains an instance from the trade date and price.
        Parameters:
        tradeDate - the trade date
        price - the price at which the trade was agreed
        Returns:
        the settlement information
      • meta

        public static TypedMetaBean<TradedPrice> meta()
        The meta-bean for TradedPrice.
        Returns:
        the meta-bean, not null
      • getTradeDate

        public java.time.LocalDate getTradeDate()
        Gets the trade date.

        The date that the trade occurred.

        Returns:
        the value of the property, not null
      • getPrice

        public double getPrice()
        Gets the price at which the trade was agreed.

        See the security type for more details on the meaning of the price.

        Returns:
        the value of the property
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object