Class BondFutureOption.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOption>
-
- com.opengamma.strata.product.bond.BondFutureOption.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<BondFutureOption>
- Enclosing class:
- BondFutureOption
public static final class BondFutureOption.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOption>
The bean-builder forBondFutureOption.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BondFutureOptionbuild()BondFutureOption.BuilderexpiryDate(LocalDate expiryDate)Sets the expiry date of the option.BondFutureOption.BuilderexpiryTime(LocalTime expiryTime)Sets the expiry time of the option.BondFutureOption.BuilderexpiryZone(ZoneId expiryZone)Sets the time-zone of the expiry time.Objectget(String propertyName)BondFutureOption.BuilderpremiumStyle(FutureOptionPremiumStyle premiumStyle)Sets the style of the option premium.BondFutureOption.BuilderputCall(PutCall putCall)Sets whether the option is put or call.BondFutureOption.Builderrounding(Rounding rounding)Sets the definition of how to round the option price, defaulted to no rounding.BondFutureOption.BuildersecurityId(SecurityId securityId)Sets the security identifier.BondFutureOption.Builderset(String propertyName, Object newValue)BondFutureOption.Builderset(org.joda.beans.MetaProperty<?> property, Object value)BondFutureOption.BuilderstrikePrice(double strikePrice)Sets the strike price, represented in decimal form.StringtoString()BondFutureOption.BuilderunderlyingFuture(BondFuture underlyingFuture)Sets the underlying future.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<BondFutureOption>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOption>
-
set
public BondFutureOption.Builder set(String propertyName, Object newValue)
-
set
public BondFutureOption.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<BondFutureOption>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOption>
-
build
public BondFutureOption build()
-
securityId
public BondFutureOption.Builder securityId(SecurityId securityId)
Sets the security identifier.This identifier uniquely identifies the security within the system.
- Parameters:
securityId- the new value, not null- Returns:
- this, for chaining, not null
-
putCall
public BondFutureOption.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 BondFutureOption.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 BondFutureOption.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 BondFutureOption.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 BondFutureOption.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 BondFutureOption.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 BondFutureOption.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
-
underlyingFuture
public BondFutureOption.Builder underlyingFuture(BondFuture underlyingFuture)
Sets the underlying future.- Parameters:
underlyingFuture- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureOption>
-
-