public final class SplitEtdOption extends Object implements org.joda.beans.ImmutableBean
| Modifier and Type | Method and 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 for
SplitEtdOption. |
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() |
public static SplitEtdOption of(int version, PutCall putCall, double strikePrice)
version - the versionputCall - the put/call flagstrikePrice - the strike pricepublic static SplitEtdOption of(int version, PutCall putCall, double strikePrice, YearMonth underlyingExpiryMonth)
version - the versionputCall - the put/call flagstrikePrice - the strike priceunderlyingExpiryMonth - the month of the underlying expirypublic static org.joda.beans.TypedMetaBean<SplitEtdOption> meta()
SplitEtdOption.public org.joda.beans.TypedMetaBean<SplitEtdOption> metaBean()
metaBean in interface org.joda.beans.Beanpublic int getVersion()
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.
public PutCall getPutCall()
public double getStrikePrice()
public Optional<YearMonth> getUnderlyingExpiryMonth()
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.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.