Class ResolvedBondFutureTrade
- java.lang.Object
-
- com.opengamma.strata.product.bond.ResolvedBondFutureTrade
-
- All Implemented Interfaces:
ResolvedTrade,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class ResolvedBondFutureTrade extends Object implements ResolvedTrade, org.joda.beans.ImmutableBean, Serializable
A trade in a futures contract based on a basket of fixed coupon bonds, resolved for pricing.This is the resolved form of
BondFutureTradeand is the primary input to the pricers. Applications will typically create aResolvedBondFutureTradefrom aBondFutureTradeusingBondFutureTrade.resolve(ReferenceData).A
ResolvedBondFutureTradeis 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.Price
Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing ofFixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResolvedBondFutureTrade.BuilderThe bean-builder forResolvedBondFutureTrade.static classResolvedBondFutureTrade.MetaThe meta-bean forResolvedBondFutureTrade.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedBondFutureTrade.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)PortfolioItemInfogetInfo()Gets the additional information, defaulted to an empty instance.ResolvedBondFuturegetProduct()Gets the future that was traded.doublegetQuantity()Gets the quantity that was traded.Optional<TradedPrice>getTradedPrice()Gets the price that was traded, together with the trade date, optional.inthashCode()static ResolvedBondFutureTrade.Metameta()The meta-bean forResolvedBondFutureTrade.ResolvedBondFutureTrade.MetametaBean()ResolvedBondFutureTrade.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
meta
public static ResolvedBondFutureTrade.Meta meta()
The meta-bean forResolvedBondFutureTrade.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedBondFutureTrade.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedBondFutureTrade.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getInfo
public PortfolioItemInfo getInfo()
Gets the additional information, defaulted to an empty instance.This allows additional information to be attached.
- Specified by:
getInfoin interfaceResolvedTrade- Returns:
- the value of the property, not null
-
getProduct
public ResolvedBondFuture getProduct()
Gets the future that was traded.The product captures the contracted financial details of the trade.
- Specified by:
getProductin interfaceResolvedTrade- Returns:
- the value of the property, not null
-
getQuantity
public double getQuantity()
Gets the quantity that was traded.This is the number of contracts that were traded. This will be positive if buying and negative if selling.
- Returns:
- the value of the property
-
getTradedPrice
public Optional<TradedPrice> getTradedPrice()
Gets the price that was traded, together with the trade date, optional.This is the price agreed when the trade occurred, in decimal form. Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of
FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.This is optional to allow the class to be used to price both trades and positions. When the instance represents a trade, the traded price should be present. When the instance represents a position, the traded price should be empty.
- Returns:
- the optional value of the property, not null
-
toBuilder
public ResolvedBondFutureTrade.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-