public static final class EtdOptionSecurity.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>
EtdOptionSecurity.| Modifier and Type | Method and 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(org.joda.beans.MetaProperty<?> property,
Object value) |
EtdOptionSecurity.Builder |
set(String propertyName,
Object newValue) |
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.
|
public Object get(String propertyName)
get in interface org.joda.beans.BeanBuilder<EtdOptionSecurity>get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>public EtdOptionSecurity.Builder set(String propertyName, Object newValue)
public EtdOptionSecurity.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set in interface org.joda.beans.BeanBuilder<EtdOptionSecurity>set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>public EtdOptionSecurity build()
public EtdOptionSecurity.Builder info(SecurityInfo info)
This includes the security identifier.
info - the new value, not nullpublic EtdOptionSecurity.Builder contractSpecId(EtdContractSpecId contractSpecId)
contractSpecId - the new value, not nullpublic EtdOptionSecurity.Builder expiry(YearMonth expiry)
Expiry will occur on a date implied by the variant of the ETD.
expiry - the new value, not nullpublic EtdOptionSecurity.Builder variant(EtdVariant variant)
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'.
variant - the new value, not nullpublic EtdOptionSecurity.Builder version(int version)
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.
version - the new valuepublic EtdOptionSecurity.Builder putCall(PutCall putCall)
putCall - the new value, not nullpublic EtdOptionSecurity.Builder strikePrice(double strikePrice)
strikePrice - the new valuepublic EtdOptionSecurity.Builder underlyingExpiryMonth(YearMonth underlyingExpiryMonth)
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.
underlyingExpiryMonth - the new valuepublic String toString()
toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<EtdOptionSecurity>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.