public final class EtdOptionTrade extends Object implements EtdTrade, ResolvableSecurityTrade, org.joda.beans.ImmutableBean, Serializable
A trade in an underlying EtdOptionSecurity.
| Modifier and Type | Class and Description |
|---|---|
static class |
EtdOptionTrade.Builder
The bean-builder for
EtdOptionTrade. |
static class |
EtdOptionTrade.Meta
The meta-bean for
EtdOptionTrade. |
| Modifier and Type | Method and Description |
|---|---|
static EtdOptionTrade.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
TradeInfo |
getInfo()
Gets the additional trade information, defaulted to an empty instance.
|
double |
getPrice()
Gets the price that was traded, in decimal form.
|
double |
getQuantity()
Gets the quantity that was traded.
|
EtdOptionSecurity |
getSecurity()
Gets the security that was traded.
|
int |
hashCode() |
static EtdOptionTrade.Meta |
meta()
The meta-bean for
EtdOptionTrade. |
EtdOptionTrade.Meta |
metaBean() |
static EtdOptionTrade |
of(TradeInfo tradeInfo,
EtdOptionSecurity security,
double quantity,
double price)
Obtains an instance from trade information, security, quantity and price.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
EtdOptionTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
EtdOptionTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
EtdOptionTrade |
withPrice(double price)
Returns an instance with the specified price.
|
EtdOptionTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCurrency, getSecurityId, getTyperesolveTargetgetIdpublic static EtdOptionTrade of(TradeInfo tradeInfo, EtdOptionSecurity security, double quantity, double price)
tradeInfo - the trade informationsecurity - the security that was tradedquantity - the quantity that was tradedprice - the price that was tradedpublic PortfolioItemSummary summarize()
PortfolioItemThis provides a summary, including a human readable description.
summarize in interface PortfolioItemsummarize in interface Tradepublic EtdOptionTrade withInfo(PortfolioItemInfo info)
SecurityQuantityTradewithInfo in interface PortfolioItemwithInfo in interface ResolvableSecurityTradewithInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infopublic EtdOptionTrade withQuantity(double quantity)
SecurityQuantityTradewithQuantity in interface ResolvableSecurityTradewithQuantity in interface SecurityQuantityTradequantity - the new quantitypublic EtdOptionTrade withPrice(double price)
SecurityQuantityTradewithPrice in interface ResolvableSecurityTradewithPrice in interface SecurityQuantityTradeprice - the new pricepublic static EtdOptionTrade.Meta meta()
EtdOptionTrade.public static EtdOptionTrade.Builder builder()
public EtdOptionTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
getInfo in interface PortfolioItemgetInfo in interface Tradepublic EtdOptionSecurity getSecurity()
getSecurity in interface EtdTradepublic double getQuantity()
This is the number of contracts that were traded. This will be positive if buying and negative if selling.
getQuantity in interface SecurityQuantitypublic double getPrice()
This is the price agreed when the trade occurred.
getPrice in interface SecurityQuantityTradepublic EtdOptionTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.