Class BondFutureSecurity.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureSecurity>
-
- com.opengamma.strata.product.bond.BondFutureSecurity.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<BondFutureSecurity>
- Enclosing class:
- BondFutureSecurity
public static final class BondFutureSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureSecurity>
The bean-builder forBondFutureSecurity.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BondFutureSecuritybuild()BondFutureSecurity.BuilderconversionFactors(Double... conversionFactors)Sets theconversionFactorsproperty in the builder from an array of objects.BondFutureSecurity.BuilderconversionFactors(List<Double> conversionFactors)Sets the conversion factor for each bond in the basket.BondFutureSecurity.Buildercurrency(Currency currency)Sets the currency that the future is traded in.BondFutureSecurity.BuilderdeliveryBasketIds(SecurityId... deliveryBasketIds)Sets thedeliveryBasketIdsproperty in the builder from an array of objects.BondFutureSecurity.BuilderdeliveryBasketIds(List<SecurityId> deliveryBasketIds)Sets the basket of deliverable bonds.BondFutureSecurity.BuilderfirstDeliveryDate(LocalDate firstDeliveryDate)Sets the first delivery date.BondFutureSecurity.BuilderfirstNoticeDate(LocalDate firstNoticeDate)Sets the first notice date.Objectget(String propertyName)BondFutureSecurity.Builderinfo(SecurityInfo info)Sets the standard security information.BondFutureSecurity.BuilderlastDeliveryDate(LocalDate lastDeliveryDate)Sets the last delivery date.BondFutureSecurity.BuilderlastNoticeDate(LocalDate lastNoticeDate)Sets the last notice date.BondFutureSecurity.BuilderlastTradeDate(LocalDate lastTradeDate)Sets the last trading date.BondFutureSecurity.Builderrounding(Rounding rounding)Sets the definition of how to round the futures price, defaulted to no rounding.BondFutureSecurity.Builderset(String propertyName, Object newValue)BondFutureSecurity.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<BondFutureSecurity>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureSecurity>
-
set
public BondFutureSecurity.Builder set(String propertyName, Object newValue)
-
set
public BondFutureSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<BondFutureSecurity>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureSecurity>
-
build
public BondFutureSecurity build()
-
info
public BondFutureSecurity.Builder info(SecurityInfo info)
Sets the standard security information.This includes the security identifier.
- Parameters:
info- the new value, not null- Returns:
- this, for chaining, not null
-
currency
public BondFutureSecurity.Builder currency(Currency currency)
Sets the currency that the future is traded in.- Parameters:
currency- the new value, not null- Returns:
- this, for chaining, not null
-
deliveryBasketIds
public BondFutureSecurity.Builder deliveryBasketIds(List<SecurityId> deliveryBasketIds)
Sets the basket of deliverable bonds.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.
- Parameters:
deliveryBasketIds- the new value, not empty- Returns:
- this, for chaining, not null
-
deliveryBasketIds
public BondFutureSecurity.Builder deliveryBasketIds(SecurityId... deliveryBasketIds)
Sets thedeliveryBasketIdsproperty in the builder from an array of objects.- Parameters:
deliveryBasketIds- the new value, not empty- Returns:
- this, for chaining, not null
-
conversionFactors
public BondFutureSecurity.Builder conversionFactors(List<Double> conversionFactors)
Sets 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
deliveryBasketIds.All of the underlying bonds must have the same notional and currency.
- Parameters:
conversionFactors- the new value, not empty- Returns:
- this, for chaining, not null
-
conversionFactors
public BondFutureSecurity.Builder conversionFactors(Double... conversionFactors)
Sets theconversionFactorsproperty in the builder from an array of objects.- Parameters:
conversionFactors- the new value, not empty- Returns:
- this, for chaining, not null
-
lastTradeDate
public BondFutureSecurity.Builder lastTradeDate(LocalDate lastTradeDate)
Sets the last trading date.The future security is traded until this date.
- Parameters:
lastTradeDate- the new value, not null- Returns:
- this, for chaining, not null
-
firstNoticeDate
public BondFutureSecurity.Builder firstNoticeDate(LocalDate firstNoticeDate)
Sets the first notice date.The first date on which the delivery of the underlying is authorized.
- Parameters:
firstNoticeDate- the new value, not null- Returns:
- this, for chaining, not null
-
lastNoticeDate
public BondFutureSecurity.Builder lastNoticeDate(LocalDate lastNoticeDate)
Sets the last notice date.The last date on which the delivery of the underlying is authorized.
- Parameters:
lastNoticeDate- the new value, not null- Returns:
- this, for chaining, not null
-
firstDeliveryDate
public BondFutureSecurity.Builder firstDeliveryDate(LocalDate firstDeliveryDate)
Sets the first delivery date.The first date on which the underlying is delivered.
If not specified, the date will be computed from
firstNoticeDateby usingsettlementDateOffsetin the first element of the delivery basket when the future is resolved.- Parameters:
firstDeliveryDate- the new value- Returns:
- this, for chaining, not null
-
lastDeliveryDate
public BondFutureSecurity.Builder lastDeliveryDate(LocalDate lastDeliveryDate)
Sets the last delivery date.The last date on which the underlying is delivered.
If not specified, the date will be computed from
lastNoticeDateby usingsettlementDateOffsetin the first element of the delivery basket when the future is resolved.- Parameters:
lastDeliveryDate- the new value- Returns:
- this, for chaining, not null
-
rounding
public BondFutureSecurity.Builder rounding(Rounding rounding)
Sets 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.
- Parameters:
rounding- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureSecurity>
-
-