Class EtdOptionSecurity.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
-
- com.opengamma.strata.product.etd.EtdOptionSecurity.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<EtdOptionSecurity>
- Enclosing class:
- EtdOptionSecurity
public static final class EtdOptionSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
The bean-builder forEtdOptionSecurity
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EtdOptionSecurity
build()
EtdOptionSecurity.Builder
contractSpecId(EtdContractSpecId contractSpecId)
Sets the ID of the contract specification from which this security is derived.EtdOptionSecurity.Builder
expiry(YearMonth expiry)
Sets the year-month of the expiry.Object
get(String propertyName)
EtdOptionSecurity.Builder
info(SecurityInfo info)
Sets the standard security information.EtdOptionSecurity.Builder
putCall(PutCall putCall)
Sets whether the option is a put or call.EtdOptionSecurity.Builder
set(String propertyName, Object newValue)
EtdOptionSecurity.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
EtdOptionSecurity.Builder
strikePrice(double strikePrice)
Sets the strike price, in decimal form, may be negative.String
toString()
EtdOptionSecurity.Builder
underlyingExpiryMonth(YearMonth underlyingExpiryMonth)
Sets the expiry year-month of the underlying instrument.EtdOptionSecurity.Builder
variant(EtdVariant variant)
Sets the variant of ETD.EtdOptionSecurity.Builder
version(int version)
Sets the version of the option, defaulted to zero.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<EtdOptionSecurity>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
-
set
public EtdOptionSecurity.Builder set(String propertyName, Object newValue)
-
set
public EtdOptionSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<EtdOptionSecurity>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
-
build
public EtdOptionSecurity build()
-
info
public EtdOptionSecurity.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
-
contractSpecId
public EtdOptionSecurity.Builder contractSpecId(EtdContractSpecId contractSpecId)
Sets the ID of the contract specification from which this security is derived.- Parameters:
contractSpecId
- the new value, not null- Returns:
- this, for chaining, not null
-
expiry
public EtdOptionSecurity.Builder expiry(YearMonth expiry)
Sets the year-month of the expiry.Expiry will occur on a date implied by the variant of the ETD.
- Parameters:
expiry
- the new value, not null- Returns:
- this, for chaining, not null
-
variant
public EtdOptionSecurity.Builder variant(EtdVariant variant)
Sets the variant of ETD.This captures the variant of the ETD. The most common variant is 'Monthly'. Other variants are 'Weekly', 'Daily' and 'Flex'.
When building, this defaults to 'Monthly'.
- Parameters:
variant
- the new value, not null- Returns:
- this, for chaining, not null
-
version
public EtdOptionSecurity.Builder version(int version)
Sets the version of the option, defaulted to zero.Some options can have multiple versions, representing some kind of change over time. Version zero is the baseline, version one and later indicates some kind of change occurred.
- Parameters:
version
- the new value- Returns:
- this, for chaining, not null
-
putCall
public EtdOptionSecurity.Builder putCall(PutCall putCall)
Sets whether the option is a put or call.- Parameters:
putCall
- the new value, not null- Returns:
- this, for chaining, not null
-
strikePrice
public EtdOptionSecurity.Builder strikePrice(double strikePrice)
Sets the strike price, in decimal form, may be negative.- Parameters:
strikePrice
- the new value- Returns:
- this, for chaining, not null
-
underlyingExpiryMonth
public EtdOptionSecurity.Builder underlyingExpiryMonth(YearMonth underlyingExpiryMonth)
Sets the expiry year-month of the underlying instrument.If an option has an underlying instrument, the expiry of that instrument can be specified here. For example, you can have an option expiring in March on the underlying March future, or on the underlying June future. Not all options have an underlying instrument, thus the property is optional.
In many cases, the expiry of the underlying instrument is the same as the expiry of the option. In this case, the expiry is often omitted, even though it probably should not be.
- Parameters:
underlyingExpiryMonth
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
-
-