Class BondFutureOptionSecurity.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOptionSecurity>
-
- com.opengamma.strata.product.bond.BondFutureOptionSecurity.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<BondFutureOptionSecurity>
- Enclosing class:
- BondFutureOptionSecurity
public static final class BondFutureOptionSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOptionSecurity>
The bean-builder forBondFutureOptionSecurity
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BondFutureOptionSecurity
build()
BondFutureOptionSecurity.Builder
currency(Currency currency)
Sets the currency that the future is traded in.BondFutureOptionSecurity.Builder
expiryDate(LocalDate expiryDate)
Sets the expiry date of the option.BondFutureOptionSecurity.Builder
expiryTime(LocalTime expiryTime)
Sets the expiry time of the option.BondFutureOptionSecurity.Builder
expiryZone(ZoneId expiryZone)
Sets the time-zone of the expiry time.Object
get(String propertyName)
BondFutureOptionSecurity.Builder
info(SecurityInfo info)
Sets the standard security information.BondFutureOptionSecurity.Builder
premiumStyle(FutureOptionPremiumStyle premiumStyle)
Sets the style of the option premium.BondFutureOptionSecurity.Builder
putCall(PutCall putCall)
Sets whether the option is put or call.BondFutureOptionSecurity.Builder
rounding(Rounding rounding)
Sets the definition of how to round the option price, defaulted to no rounding.BondFutureOptionSecurity.Builder
set(String propertyName, Object newValue)
BondFutureOptionSecurity.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
BondFutureOptionSecurity.Builder
strikePrice(double strikePrice)
Sets the strike price, represented in decimal form.String
toString()
BondFutureOptionSecurity.Builder
underlyingFutureId(SecurityId underlyingFutureId)
Sets the identifier of the underlying future.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<BondFutureOptionSecurity>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOptionSecurity>
-
set
public BondFutureOptionSecurity.Builder set(String propertyName, Object newValue)
-
set
public BondFutureOptionSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<BondFutureOptionSecurity>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOptionSecurity>
-
build
public BondFutureOptionSecurity build()
-
info
public BondFutureOptionSecurity.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 BondFutureOptionSecurity.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
-
putCall
public BondFutureOptionSecurity.Builder putCall(PutCall putCall)
Sets whether the option is put or call.A call gives the owner the right, but not obligation, to buy the underlying at an agreed price in the future. A put gives a similar option to sell.
- Parameters:
putCall
- the new value- Returns:
- this, for chaining, not null
-
strikePrice
public BondFutureOptionSecurity.Builder strikePrice(double strikePrice)
Sets the strike price, represented in decimal form.This is the price at which the option applies and refers to the price of the underlying future. This must be represented in decimal form,
(1.0 - decimalRate)
. As such, the common market price of 99.3 for a 0.7% rate must be input as 0.993. The rate implied by the strike can take negative values.- Parameters:
strikePrice
- the new value- Returns:
- this, for chaining, not null
-
expiryDate
public BondFutureOptionSecurity.Builder expiryDate(LocalDate expiryDate)
Sets the expiry date of the option.The expiry date is related to the expiry time and time-zone. The date must not be after last trade date of the underlying future.
- Parameters:
expiryDate
- the new value, not null- Returns:
- this, for chaining, not null
-
expiryTime
public BondFutureOptionSecurity.Builder expiryTime(LocalTime expiryTime)
Sets the expiry time of the option.The expiry time is related to the expiry date and time-zone.
- Parameters:
expiryTime
- the new value, not null- Returns:
- this, for chaining, not null
-
expiryZone
public BondFutureOptionSecurity.Builder expiryZone(ZoneId expiryZone)
Sets the time-zone of the expiry time.The expiry time-zone is related to the expiry date and time.
- Parameters:
expiryZone
- the new value, not null- Returns:
- this, for chaining, not null
-
premiumStyle
public BondFutureOptionSecurity.Builder premiumStyle(FutureOptionPremiumStyle premiumStyle)
Sets the style of the option premium.The two options are daily margining and upfront premium.
- Parameters:
premiumStyle
- the new value, not null- Returns:
- this, for chaining, not null
-
rounding
public BondFutureOptionSecurity.Builder rounding(Rounding rounding)
Sets the definition of how to round the option 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 is represented as 0.997125 which has 6 decimal places.
- Parameters:
rounding
- the new value, not null- Returns:
- this, for chaining, not null
-
underlyingFutureId
public BondFutureOptionSecurity.Builder underlyingFutureId(SecurityId underlyingFutureId)
Sets the identifier of the underlying future.- Parameters:
underlyingFutureId
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOptionSecurity>
-
-