Package com.opengamma.strata.product
Class TradedPrice
- java.lang.Object
-
- com.opengamma.strata.product.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
double
getPrice()
Gets the price at which the trade was agreed.LocalDate
getTradeDate()
Gets the trade date.int
hashCode()
static org.joda.beans.TypedMetaBean<TradedPrice>
meta()
The meta-bean forTradedPrice
.org.joda.beans.TypedMetaBean<TradedPrice>
metaBean()
static TradedPrice
of(LocalDate tradeDate, double price)
Obtains an instance from the trade date and price.String
toString()
-
-
-
Method Detail
-
of
public static TradedPrice of(LocalDate tradeDate, double price)
Obtains an instance from the trade date and price.- Parameters:
tradeDate
- the trade dateprice
- the price at which the trade was agreed- Returns:
- the settlement information
-
meta
public static org.joda.beans.TypedMetaBean<TradedPrice> meta()
The meta-bean forTradedPrice
.- Returns:
- the meta-bean, not null
-
metaBean
public org.joda.beans.TypedMetaBean<TradedPrice> metaBean()
- Specified by:
metaBean
in interfaceorg.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
-
-