Package com.opengamma.strata.product.etd
Class SplitEtdOption
- java.lang.Object
-
- com.opengamma.strata.product.etd.SplitEtdOption
-
- All Implemented Interfaces:
org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class SplitEtdOption extends Object implements org.joda.beans.ImmutableBean
The option fields of a split OG-ETD identifier.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
PutCall
getPutCall()
Gets whether the option is a put or call.double
getStrikePrice()
Gets the strike price, in decimal form, may be negative.Optional<YearMonth>
getUnderlyingExpiryMonth()
Gets the expiry year-month of the underlying instrument.int
getVersion()
Gets the version of the option, defaulted to zero.int
hashCode()
static org.joda.beans.TypedMetaBean<SplitEtdOption>
meta()
The meta-bean forSplitEtdOption
.org.joda.beans.TypedMetaBean<SplitEtdOption>
metaBean()
static SplitEtdOption
of(int version, PutCall putCall, double strikePrice)
Obtains an instance.static SplitEtdOption
of(int version, PutCall putCall, double strikePrice, YearMonth underlyingExpiryMonth)
Obtains an instance.String
toString()
-
-
-
Method Detail
-
of
public static SplitEtdOption of(int version, PutCall putCall, double strikePrice)
Obtains an instance.- Parameters:
version
- the versionputCall
- the put/call flagstrikePrice
- the strike price- Returns:
- the instance
-
of
public static SplitEtdOption of(int version, PutCall putCall, double strikePrice, YearMonth underlyingExpiryMonth)
Obtains an instance.- Parameters:
version
- the versionputCall
- the put/call flagstrikePrice
- the strike priceunderlyingExpiryMonth
- the month of the underlying expiry- Returns:
- the instance
-
meta
public static org.joda.beans.TypedMetaBean<SplitEtdOption> meta()
The meta-bean forSplitEtdOption
.- Returns:
- the meta-bean, not null
-
metaBean
public org.joda.beans.TypedMetaBean<SplitEtdOption> metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getVersion
public int getVersion()
Gets 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.
- Returns:
- the value of the property
-
getPutCall
public PutCall getPutCall()
Gets whether the option is a put or call.- Returns:
- the value of the property, not null
-
getStrikePrice
public double getStrikePrice()
Gets the strike price, in decimal form, may be negative.- Returns:
- the value of the property
-
getUnderlyingExpiryMonth
public Optional<YearMonth> getUnderlyingExpiryMonth()
Gets 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.
- Returns:
- the optional value of the property, not null
-
-