public static final class ResolvedBondFutureTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
ResolvedBondFutureTrade
.Modifier and Type | Method and Description |
---|---|
ResolvedBondFutureTrade |
build() |
Object |
get(String propertyName) |
ResolvedBondFutureTrade.Builder |
info(PortfolioItemInfo info)
Sets the additional information, defaulted to an empty instance.
|
ResolvedBondFutureTrade.Builder |
product(ResolvedBondFuture product)
Sets the future that was traded.
|
ResolvedBondFutureTrade.Builder |
quantity(double quantity)
Sets the quantity that was traded.
|
ResolvedBondFutureTrade.Builder |
set(org.joda.beans.MetaProperty<?> property,
Object value) |
ResolvedBondFutureTrade.Builder |
set(String propertyName,
Object newValue) |
String |
toString() |
ResolvedBondFutureTrade.Builder |
tradedPrice(TradedPrice tradedPrice)
Sets the price that was traded, together with the trade date, optional.
|
public Object get(String propertyName)
get
in interface org.joda.beans.BeanBuilder<ResolvedBondFutureTrade>
get
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
public ResolvedBondFutureTrade.Builder set(String propertyName, Object newValue)
public ResolvedBondFutureTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set
in interface org.joda.beans.BeanBuilder<ResolvedBondFutureTrade>
set
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
public ResolvedBondFutureTrade build()
public ResolvedBondFutureTrade.Builder info(PortfolioItemInfo info)
This allows additional information to be attached.
info
- the new value, not nullpublic ResolvedBondFutureTrade.Builder product(ResolvedBondFuture product)
The product captures the contracted financial details of the trade.
product
- the new value, not nullpublic ResolvedBondFutureTrade.Builder quantity(double quantity)
This is the number of contracts that were traded. This will be positive if buying and negative if selling.
quantity
- the new valuepublic ResolvedBondFutureTrade.Builder tradedPrice(TradedPrice tradedPrice)
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.
tradedPrice
- the new valuepublic String toString()
toString
in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.