Class BondFuture
- java.lang.Object
-
- com.opengamma.strata.product.bond.BondFuture
-
- All Implemented Interfaces:
Resolvable<ResolvedBondFuture>
,Product
,SecuritizedProduct
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class BondFuture extends Object implements SecuritizedProduct, Resolvable<ResolvedBondFuture>, org.joda.beans.ImmutableBean, Serializable
A futures contract, based on a basket of fixed coupon bonds.A bond future is a financial instrument that is based on the future value of a basket of fixed coupon bonds. The profit or loss of a bond future is settled daily. This class represents the structure of a single futures contract.
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 class
BondFuture.Builder
The bean-builder forBondFuture
.static class
BondFuture.Meta
The meta-bean forBondFuture
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BondFuture.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
ImmutableList<Double>
getConversionFactors()
Gets the conversion factor for each bond in the basket.Currency
getCurrency()
Obtains the currency of the underlying fixed coupon bonds.ImmutableList<FixedCouponBond>
getDeliveryBasket()
Gets the basket of deliverable bonds.Optional<LocalDate>
getFirstDeliveryDate()
Gets the first delivery date.LocalDate
getFirstNoticeDate()
Gets the first notice date.Optional<LocalDate>
getLastDeliveryDate()
Gets the last delivery date.LocalDate
getLastNoticeDate()
Gets the last notice date.LocalDate
getLastTradeDate()
Gets the last trading date.double
getNotional()
Obtains the notional of underlying fixed coupon bonds.Rounding
getRounding()
Gets the definition of how to round the futures price, defaulted to no rounding.SecurityId
getSecurityId()
Gets the security identifier.int
hashCode()
static BondFuture.Meta
meta()
The meta-bean forBondFuture
.BondFuture.Meta
metaBean()
ResolvedBondFuture
resolve(ReferenceData refData)
Resolves this object using the specified reference data.BondFuture.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Product
allPaymentCurrencies, isCrossCurrency
-
Methods inherited from interface com.opengamma.strata.product.SecuritizedProduct
allCurrencies
-
-
-
-
Method Detail
-
getNotional
public double getNotional()
Obtains the notional of underlying fixed coupon bonds.All of the bonds in the delivery basket have the same notional.
- Returns:
- the notional
-
getCurrency
public Currency getCurrency()
Obtains the currency of the underlying fixed coupon bonds.All of the bonds in the delivery basket have the same currency.
- Specified by:
getCurrency
in interfaceSecuritizedProduct
- Returns:
- the currency
-
resolve
public ResolvedBondFuture resolve(ReferenceData refData)
Description copied from interface:Resolvable
Resolves this object using the specified reference data.This converts the object implementing this interface to the equivalent resolved form. All
ReferenceDataId
identifiers in this instance will be resolved. The resolved form will typically be a type that 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.
- Specified by:
resolve
in interfaceResolvable<ResolvedBondFuture>
- Parameters:
refData
- the reference data to use when resolving- Returns:
- the resolved instance
-
meta
public static BondFuture.Meta meta()
The meta-bean forBondFuture
.- Returns:
- the meta-bean, not null
-
builder
public static BondFuture.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public BondFuture.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getSecurityId
public SecurityId getSecurityId()
Gets the security identifier.This identifier uniquely identifies the security within the system.
- Specified by:
getSecurityId
in interfaceSecuritizedProduct
- Returns:
- the value of the property, not null
-
getDeliveryBasket
public ImmutableList<FixedCouponBond> getDeliveryBasket()
Gets the basket of deliverable bonds.The underling which will be delivered in the future time is chosen from a basket of underling securities. This must not be empty.
All of the underlying bonds must have the same notional and currency.
- Returns:
- the value of the property, not empty
-
getConversionFactors
public ImmutableList<Double> getConversionFactors()
Gets the conversion factor for each bond in the basket.The price of each underlying security in the basket is rescaled by the conversion factor. This must not be empty, and its size must be the same as the size of
deliveryBasket
.All of the underlying bonds must have the same notional and currency.
- Returns:
- the value of the property, not empty
-
getLastTradeDate
public LocalDate getLastTradeDate()
Gets the last trading date.The future security is traded until this date.
- Returns:
- the value of the property, not null
-
getFirstNoticeDate
public LocalDate getFirstNoticeDate()
Gets the first notice date.The first date on which the delivery of the underlying is authorized.
- Returns:
- the value of the property, not null
-
getLastNoticeDate
public LocalDate getLastNoticeDate()
Gets the last notice date.The last date on which the delivery of the underlying is authorized.
- Returns:
- the value of the property, not null
-
getFirstDeliveryDate
public Optional<LocalDate> getFirstDeliveryDate()
Gets the first delivery date.The first date on which the underlying is delivered.
If not specified, the date will be computed from
firstNoticeDate
by usingsettlementDateOffset
in the first element of the delivery basket when the future is resolved.- Returns:
- the optional value of the property, not null
-
getLastDeliveryDate
public Optional<LocalDate> getLastDeliveryDate()
Gets the last delivery date.The last date on which the underlying is delivered.
If not specified, the date will be computed from
lastNoticeDate
by usingsettlementDateOffset
in the first element of the delivery basket when the future is resolved.- Returns:
- the optional value of the property, not null
-
getRounding
public Rounding getRounding()
Gets the definition of how to round the futures price, defaulted to no rounding.The price is represented in decimal form, not percentage form. As such, the decimal places expressed by the rounding refers to this decimal form. For example, the common market price of 99.7125 for a 0.2875% rate is represented as 0.997125 which has 6 decimal places.
- Returns:
- the value of the property, not null
-
toBuilder
public BondFuture.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-