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 EtdOptionSecuritybuild()EtdOptionSecurity.BuildercontractSpecId(EtdContractSpecId contractSpecId)Sets the ID of the contract specification from which this security is derived.EtdOptionSecurity.Builderexpiry(YearMonth expiry)Sets the year-month of the expiry.Objectget(String propertyName)EtdOptionSecurity.Builderinfo(SecurityInfo info)Sets the standard security information.EtdOptionSecurity.BuilderputCall(PutCall putCall)Sets whether the option is a put or call.EtdOptionSecurity.Builderset(String propertyName, Object newValue)EtdOptionSecurity.Builderset(org.joda.beans.MetaProperty<?> property, Object value)EtdOptionSecurity.BuilderstrikePrice(double strikePrice)Sets the strike price, in decimal form, may be negative.StringtoString()EtdOptionSecurity.BuilderunderlyingExpiryMonth(YearMonth underlyingExpiryMonth)Sets the expiry year-month of the underlying instrument.EtdOptionSecurity.Buildervariant(EtdVariant variant)Sets the variant of ETD.EtdOptionSecurity.Builderversion(int version)Sets the version of the option, defaulted to zero. 
 - 
 
- 
- 
Method Detail
- 
get
public Object get(String propertyName)
- Specified by:
 getin interfaceorg.joda.beans.BeanBuilder<EtdOptionSecurity>- Overrides:
 getin 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:
 setin interfaceorg.joda.beans.BeanBuilder<EtdOptionSecurity>- Overrides:
 setin 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:
 toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
 
 - 
 
 -