public final class BondFutureSecurity extends Object implements Security, org.joda.beans.ImmutableBean, Serializable
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.
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 |
BondFutureSecurity.Builder
The bean-builder for
BondFutureSecurity. |
static class |
BondFutureSecurity.Meta
The meta-bean for
BondFutureSecurity. |
| Modifier and Type | Method and Description |
|---|---|
static BondFutureSecurity.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
BondFuturePosition |
createPosition(PositionInfo positionInfo,
double longQuantity,
double shortQuantity,
ReferenceData refData)
Creates a position based on this security from a long and short quantity.
|
BondFuturePosition |
createPosition(PositionInfo positionInfo,
double quantity,
ReferenceData refData)
Creates a position based on this security from a net quantity.
|
BondFuture |
createProduct(ReferenceData refData)
Creates the product associated with this security.
|
BondFutureTrade |
createTrade(TradeInfo info,
double quantity,
double tradePrice,
ReferenceData refData)
Creates a trade based on this security.
|
boolean |
equals(Object obj) |
ImmutableList<Double> |
getConversionFactors()
Gets the conversion factor for each bond in the basket.
|
Currency |
getCurrency()
Gets the currency that the future is traded in.
|
ImmutableList<SecurityId> |
getDeliveryBasketIds()
Gets the basket of deliverable bonds.
|
Optional<LocalDate> |
getFirstDeliveryDate()
Gets the first delivery date.
|
LocalDate |
getFirstNoticeDate()
Gets the first notice date.
|
SecurityInfo |
getInfo()
Gets the standard security information.
|
Optional<LocalDate> |
getLastDeliveryDate()
Gets the last delivery date.
|
LocalDate |
getLastNoticeDate()
Gets the last notice date.
|
LocalDate |
getLastTradeDate()
Gets the last trading date.
|
Rounding |
getRounding()
Gets the definition of how to round the futures price, defaulted to no rounding.
|
ImmutableSet<SecurityId> |
getUnderlyingIds()
Gets the set of underlying security identifiers.
|
int |
hashCode() |
static BondFutureSecurity.Meta |
meta()
The meta-bean for
BondFutureSecurity. |
BondFutureSecurity.Meta |
metaBean() |
BondFutureSecurity.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
BondFutureSecurity |
withInfo(SecurityInfo info)
Returns an instance with the specified info.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSecurityIdpublic ImmutableSet<SecurityId> getUnderlyingIds()
SecurityThe set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket.
getUnderlyingIds in interface Securitypublic BondFutureSecurity withInfo(SecurityInfo info)
Securitypublic BondFuture createProduct(ReferenceData refData)
SecurityThe product of a security is distinct from the security. The product includes the financial details from this security, but excludes the additional information. The product also includes the products of any underlying securities.
createProduct in interface SecurityrefData - the reference data used to find underlying securitiespublic BondFutureTrade createTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData)
SecurityThis creates a trade of a suitable type for this security.
createTrade in interface Securityinfo - the trade informationquantity - the number of contracts in the tradetradePrice - the price agreed when the trade occurredrefData - the reference data used to find underlying securitiespublic BondFuturePosition createPosition(PositionInfo positionInfo, double quantity, ReferenceData refData)
SecurityThis creates a position of a suitable type for this security.
createPosition in interface SecuritypositionInfo - the position informationquantity - the number of contracts in the positionrefData - the reference data used to find underlying securitiespublic BondFuturePosition createPosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)
SecurityThis creates a position of a suitable type for this security.
The long quantity and short quantity must be zero or positive, not negative.
createPosition in interface SecuritypositionInfo - the position informationlongQuantity - the long quantity in the positionshortQuantity - the short quantity in the positionrefData - the reference data used to find underlying securitiespublic static BondFutureSecurity.Meta meta()
BondFutureSecurity.public static BondFutureSecurity.Builder builder()
public BondFutureSecurity.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic SecurityInfo getInfo()
This includes the security identifier.
public Currency getCurrency()
getCurrency in interface Securitypublic ImmutableList<SecurityId> getDeliveryBasketIds()
The underlying 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.
public ImmutableList<Double> getConversionFactors()
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 deliveryBasketIds.
All of the underlying bonds must have the same notional and currency.
public LocalDate getLastTradeDate()
The future security is traded until this date.
public LocalDate getFirstNoticeDate()
The first date on which the delivery of the underlying is authorized.
public LocalDate getLastNoticeDate()
The last date on which the delivery of the underlying is authorized.
public Optional<LocalDate> getFirstDeliveryDate()
The first date on which the underlying is delivered.
If not specified, the date will be computed from firstNoticeDate by using
settlementDateOffset in the first element of the delivery basket
when the future is resolved.
public Optional<LocalDate> getLastDeliveryDate()
The last date on which the underlying is delivered.
If not specified, the date will be computed from lastNoticeDate by using
settlementDateOffset in the first element of the delivery basket
when the future is resolved.
public Rounding getRounding()
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.
public BondFutureSecurity.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.