public final class RawOptionData extends Object implements org.joda.beans.ImmutableBean, Serializable
| Modifier and Type | Method and Description |
|---|---|
Pair<DoubleArray,DoubleArray> |
availableSmileAtExpiry(Period expiry)
For a given expiration returns all the data available.
|
boolean |
equals(Object obj) |
DoubleMatrix |
getData()
Gets the data.
|
ValueType |
getDataType()
Gets the type of the raw data.
|
Optional<DoubleMatrix> |
getError()
Gets the measurement error of the option data.
|
ImmutableList<Period> |
getExpiries()
Gets the expiry values.
|
OptionalDouble |
getShift()
Gets the shift for which the raw data is valid.
|
DoubleArray |
getStrikes()
Gets the strike values.
|
ValueType |
getStrikeType()
Gets the value type of the strike-like dimension.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<RawOptionData> |
meta()
The meta-bean for
RawOptionData. |
org.joda.beans.TypedMetaBean<RawOptionData> |
metaBean() |
static RawOptionData |
of(List<Period> expiries,
DoubleArray strikes,
ValueType strikeType,
DoubleMatrix data,
DoubleMatrix error,
ValueType dataType)
Obtains an instance of the raw data with error.
|
static RawOptionData |
of(List<Period> expiries,
DoubleArray strikes,
ValueType strikeType,
DoubleMatrix data,
ValueType dataType)
Obtains an instance of the raw volatility.
|
static RawOptionData |
ofBlackVolatility(List<Period> expiries,
DoubleArray strikes,
ValueType strikeType,
DoubleMatrix data,
Double shift)
Obtains an instance of the raw volatility for shifted Black (log-normal) volatility.
|
static RawOptionData |
ofBlackVolatility(List<Period> expiries,
DoubleArray strikes,
ValueType strikeType,
DoubleMatrix data,
DoubleMatrix error,
Double shift)
Obtains an instance of the raw data with error for shifted Black (log-normal) volatility.
|
String |
toString() |
public static RawOptionData of(List<Period> expiries, DoubleArray strikes, ValueType strikeType, DoubleMatrix data, ValueType dataType)
The data values can be model parameters (like Black or normal volatilities) or direct option prices.
expiries - the expiriesstrikes - the strikes-like datastrikeType - the value type of the strike-like dimensiondata - the datadataType - the data typepublic static RawOptionData ofBlackVolatility(List<Period> expiries, DoubleArray strikes, ValueType strikeType, DoubleMatrix data, Double shift)
expiries - the expiriesstrikes - the strikes-like datastrikeType - the value type of the strike-like dimensiondata - the datashift - the shiftpublic static RawOptionData of(List<Period> expiries, DoubleArray strikes, ValueType strikeType, DoubleMatrix data, DoubleMatrix error, ValueType dataType)
The data values can be model parameters (like Black or normal volatilities) or direct option prices.
expiries - the expiriesstrikes - the strikes-like datastrikeType - the value type of the strike-like dimensiondata - the dataerror - the errordataType - the data typepublic static RawOptionData ofBlackVolatility(List<Period> expiries, DoubleArray strikes, ValueType strikeType, DoubleMatrix data, DoubleMatrix error, Double shift)
expiries - the expiriesstrikes - the strikes-like datastrikeType - the value type of the strike-like dimensiondata - the dataerror - the errorshift - the shiftpublic Pair<DoubleArray,DoubleArray> availableSmileAtExpiry(Period expiry)
expiry - the expirationpublic static org.joda.beans.TypedMetaBean<RawOptionData> meta()
RawOptionData.public org.joda.beans.TypedMetaBean<RawOptionData> metaBean()
metaBean in interface org.joda.beans.Beanpublic ImmutableList<Period> getExpiries()
public DoubleArray getStrikes()
public ValueType getStrikeType()
public DoubleMatrix getData()
public Optional<DoubleMatrix> getError()
These will be used if the option data is calibrated by a least square method.
data and error must have the same number of elements.
public ValueType getDataType()
public OptionalDouble getShift()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.