Class TradedPrice

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

    public final class TradedPrice
    extends Object
    implements org.joda.beans.ImmutableBean, 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​(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 org.joda.beans.TypedMetaBean<TradedPrice> meta()
        The meta-bean for TradedPrice.
        Returns:
        the meta-bean, not null
      • metaBean

        public org.joda.beans.TypedMetaBean<TradedPrice> metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getTradeDate

        public 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object