public final class FixedCouponBondTrade extends Object implements SecuritizedProductTrade<FixedCouponBond>, ResolvableTrade<ResolvedFixedCouponBondTrade>, org.joda.beans.ImmutableBean, Serializable
A trade in an underlying FixedCouponBond.
| Modifier and Type | Class and Description |
|---|---|
static class |
FixedCouponBondTrade.Builder
The bean-builder for
FixedCouponBondTrade. |
static class |
FixedCouponBondTrade.Meta
The meta-bean for
FixedCouponBondTrade. |
| Modifier and Type | Method and Description |
|---|---|
static FixedCouponBondTrade.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 clean price at which the bond was traded, in decimal form.
|
FixedCouponBond |
getProduct()
Gets the bond that was traded.
|
double |
getQuantity()
Gets the quantity that was traded.
|
int |
hashCode() |
static FixedCouponBondTrade.Meta |
meta()
The meta-bean for
FixedCouponBondTrade. |
FixedCouponBondTrade.Meta |
metaBean() |
ResolvedFixedCouponBondTrade |
resolve(ReferenceData refData)
Resolves this trade using the specified reference data.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
FixedCouponBondTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
FixedCouponBondTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
FixedCouponBondTrade |
withPrice(double price)
Returns an instance with the specified price.
|
FixedCouponBondTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdgetCurrency, getSecurityIdpublic FixedCouponBondTrade withInfo(PortfolioItemInfo info)
SecuritizedProductTradewithInfo in interface PortfolioItemwithInfo in interface ProductTradewithInfo in interface ResolvableTrade<ResolvedFixedCouponBondTrade>withInfo in interface SecuritizedProductTrade<FixedCouponBond>withInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infopublic FixedCouponBondTrade withQuantity(double quantity)
SecuritizedProductTradewithQuantity in interface SecuritizedProductPortfolioItem<FixedCouponBond>withQuantity in interface SecuritizedProductTrade<FixedCouponBond>withQuantity in interface SecurityQuantityTradequantity - the new quantitypublic FixedCouponBondTrade withPrice(double price)
SecuritizedProductTradewithPrice in interface SecuritizedProductTrade<FixedCouponBond>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 ResolvedFixedCouponBondTrade 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<ResolvedFixedCouponBondTrade>resolve in interface ResolvableTrade<ResolvedFixedCouponBondTrade>refData - the reference data to use when resolvingpublic static FixedCouponBondTrade.Meta meta()
FixedCouponBondTrade.public static FixedCouponBondTrade.Builder builder()
public FixedCouponBondTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
Either the trade or settlement date is required when calling resolve(ReferenceData).
getInfo in interface PortfolioItemgetInfo in interface Tradepublic FixedCouponBond getProduct()
The product captures the contracted financial details of the trade.
getProduct in interface ProductTradegetProduct in interface SecuritizedProductPortfolioItem<FixedCouponBond>public double getQuantity()
This will be positive if buying and negative if selling.
getQuantity in interface SecurityQuantitypublic double getPrice()
The "clean" price excludes any accrued interest.
Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932.
getPrice in interface SecurityQuantityTradepublic FixedCouponBondTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.