public final class BondFutureTrade extends Object implements SecuritizedProductTrade<BondFuture>, ResolvableTrade<ResolvedBondFutureTrade>, org.joda.beans.ImmutableBean, Serializable
A trade in an underlying BondFuture.
FixedCouponBond. The bond futures delivery is a bond
for an amount computed from the bond future price, a conversion factor and the accrued interest.| Modifier and Type | Class and Description |
|---|---|
static class |
BondFutureTrade.Builder
The bean-builder for
BondFutureTrade. |
static class |
BondFutureTrade.Meta
The meta-bean for
BondFutureTrade. |
| Modifier and Type | Method and Description |
|---|---|
static BondFutureTrade.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.
|
BondFuture |
getProduct()
Gets the future that was traded.
|
double |
getQuantity()
Gets the quantity that was traded.
|
int |
hashCode() |
static BondFutureTrade.Meta |
meta()
The meta-bean for
BondFutureTrade. |
BondFutureTrade.Meta |
metaBean() |
ResolvedBondFutureTrade |
resolve(ReferenceData refData)
Resolves this trade using the specified reference data.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
BondFutureTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
BondFutureTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
BondFutureTrade |
withPrice(double price)
Returns an instance with the specified price.
|
BondFutureTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdgetCurrency, getSecurityIdpublic BondFutureTrade withInfo(PortfolioItemInfo info)
SecuritizedProductTradewithInfo in interface PortfolioItemwithInfo in interface ProductTradewithInfo in interface ResolvableTrade<ResolvedBondFutureTrade>withInfo in interface SecuritizedProductTrade<BondFuture>withInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infopublic BondFutureTrade withQuantity(double quantity)
SecuritizedProductTradewithQuantity in interface SecuritizedProductPortfolioItem<BondFuture>withQuantity in interface SecuritizedProductTrade<BondFuture>withQuantity in interface SecurityQuantityTradequantity - the new quantitypublic BondFutureTrade withPrice(double price)
SecuritizedProductTradewithPrice in interface SecuritizedProductTrade<BondFuture>withPrice in interface SecurityQuantityTradeprice - the new pricepublic PortfolioItemSummary summarize()
PortfolioItemThis provides a summary, including a human readable description.
summarize in interface PortfolioItemsummarize in interface Tradepublic ResolvedBondFutureTrade resolve(ReferenceData refData)
ResolvableTrade
This converts this trade to the equivalent resolved form.
All ReferenceDataId identifiers in this instance will be resolved.
The resulting ResolvedTrade is optimized for pricing.
Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.
resolve in interface Resolvable<ResolvedBondFutureTrade>resolve in interface ResolvableTrade<ResolvedBondFutureTrade>refData - the reference data to use when resolvingpublic static BondFutureTrade.Meta meta()
BondFutureTrade.public static BondFutureTrade.Builder builder()
public BondFutureTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
The trade date is required when calling resolve(ReferenceData).
getInfo in interface PortfolioItemgetInfo in interface Tradepublic BondFuture getProduct()
The product captures the contracted financial details of the trade.
getProduct in interface ProductTradegetProduct in interface SecuritizedProductPortfolioItem<BondFuture>public 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 BondFutureTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.