Class ResolvedBondFutureOption.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOption>
-
- com.opengamma.strata.product.bond.ResolvedBondFutureOption.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedBondFutureOption>
- Enclosing class:
- ResolvedBondFutureOption
public static final class ResolvedBondFutureOption.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOption>
The bean-builder forResolvedBondFutureOption
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedBondFutureOption
build()
ResolvedBondFutureOption.Builder
expiry(ZonedDateTime expiry)
Sets the expiry of the option.Object
get(String propertyName)
ResolvedBondFutureOption.Builder
premiumStyle(FutureOptionPremiumStyle premiumStyle)
Sets the style of the option premium.ResolvedBondFutureOption.Builder
putCall(PutCall putCall)
Sets whether the option is put or call.ResolvedBondFutureOption.Builder
rounding(Rounding rounding)
Sets the definition of how to round the option price, defaulted to no rounding.ResolvedBondFutureOption.Builder
securityId(SecurityId securityId)
Sets the security identifier.ResolvedBondFutureOption.Builder
set(String propertyName, Object newValue)
ResolvedBondFutureOption.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
ResolvedBondFutureOption.Builder
strikePrice(double strikePrice)
Sets the strike price, represented in decimal form.String
toString()
ResolvedBondFutureOption.Builder
underlyingFuture(ResolvedBondFuture underlyingFuture)
Sets the underlying future.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<ResolvedBondFutureOption>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOption>
-
set
public ResolvedBondFutureOption.Builder set(String propertyName, Object newValue)
-
set
public ResolvedBondFutureOption.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<ResolvedBondFutureOption>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOption>
-
build
public ResolvedBondFutureOption build()
-
securityId
public ResolvedBondFutureOption.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 ResolvedBondFutureOption.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 ResolvedBondFutureOption.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.
- Parameters:
strikePrice
- the new value- Returns:
- this, for chaining, not null
-
expiry
public ResolvedBondFutureOption.Builder expiry(ZonedDateTime expiry)
Sets the expiry of the option.The date must not be after last trade date of the underlying future.
- Parameters:
expiry
- the new value, not null- Returns:
- this, for chaining, not null
-
premiumStyle
public ResolvedBondFutureOption.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 ResolvedBondFutureOption.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 ResolvedBondFutureOption.Builder underlyingFuture(ResolvedBondFuture underlyingFuture)
Sets the underlying future.- Parameters:
underlyingFuture
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOption>
-
-