public final class TradedPrice extends Object implements org.joda.beans.ImmutableBean, Serializable
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.
| Modifier and Type | Method and 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 for
TradedPrice. |
org.joda.beans.TypedMetaBean<TradedPrice> |
metaBean() |
static TradedPrice |
of(LocalDate tradeDate,
double price)
Obtains an instance from the trade date and price.
|
String |
toString() |
public static TradedPrice of(LocalDate tradeDate, double price)
tradeDate - the trade dateprice - the price at which the trade was agreedpublic static org.joda.beans.TypedMetaBean<TradedPrice> meta()
TradedPrice.public org.joda.beans.TypedMetaBean<TradedPrice> metaBean()
metaBean in interface org.joda.beans.Beanpublic LocalDate getTradeDate()
The date that the trade occurred.
public double getPrice()
See the security type for more details on the meaning of the price.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.