DATATYPE
- data typepublic class EquityFitDataManager<DATATYPE extends EquityFitData> extends Object implements RowDataManager<FitScope,DATATYPE>
RowDataManager.LoadExtraColumns<DATATYPE>
Modifier and Type | Field and Description |
---|---|
protected ColumnSource |
csCarryCurveDates |
protected ColumnSource |
csCarryCurveErrors |
protected ColumnSource |
csCarryCurveRates |
protected ColumnSource |
csDivCashAmounts |
protected ColumnSource |
csDivExDates |
protected ColumnSource |
csDivProportionalAmounts |
protected ColumnSource |
csFitGroup |
protected ColumnSource |
csOptionExerciseTypes |
protected ColumnSource |
csOptionExpirations |
protected ColumnSource |
csOptionIds |
protected ColumnSource |
csOptionPayoffTypes |
protected ColumnSource |
csOptionRoots |
protected ColumnSource |
csOptionSettlementTypes |
protected ColumnSource |
csOptionStrikes |
protected ColumnSource |
csOptionSyms |
protected ColumnSource |
csTimestamp |
protected ColumnSource |
csUnderlyingAsk |
protected ColumnSource |
csUnderlyingBid |
protected ColumnSource |
csUnderlyingId |
protected ColumnSource |
csUnderlyingSym |
protected ColumnSource |
csUnderlyingType |
protected ColumnSource |
csYieldCurveDates |
protected ColumnSource |
csYieldCurveRates |
Constructor and Description |
---|
EquityFitDataManager(Supplier<DATATYPE> newEquityFitData,
RowDataManager.LoadExtraColumns<DATATYPE> loadFitDataExtraColumns,
DynamicTable data)
Create a multithreaded resource to fit a derivative model's parameters for equities.
|
Modifier and Type | Method and Description |
---|---|
void |
loadData(DATATYPE fitData,
long index,
boolean usePrev)
Populates a data object with data from a table row.
|
DATATYPE |
newData()
Creates a new data instance.
|
DynamicTable |
table()
Gets the source table.
|
double |
underlyingMidCurrent(long index)
Gets the current mid market price for the underlying, or NULL if both the bid and ask are not present.
|
FitScope |
uniqueIdCurrent(long index)
Gets the current unique identifier value for a row.
|
FitScope |
uniqueIdPrev(long index)
Gets the previous unique identifier value for a row.
|
protected final ColumnSource csFitGroup
protected final ColumnSource csTimestamp
protected final ColumnSource csUnderlyingId
protected final ColumnSource csUnderlyingSym
protected final ColumnSource csUnderlyingType
protected final ColumnSource csUnderlyingBid
protected final ColumnSource csUnderlyingAsk
protected final ColumnSource csOptionIds
protected final ColumnSource csOptionSyms
protected final ColumnSource csOptionRoots
protected final ColumnSource csOptionPayoffTypes
protected final ColumnSource csOptionExerciseTypes
protected final ColumnSource csOptionSettlementTypes
protected final ColumnSource csOptionExpirations
protected final ColumnSource csOptionStrikes
protected final ColumnSource csDivExDates
protected final ColumnSource csDivCashAmounts
protected final ColumnSource csDivProportionalAmounts
protected final ColumnSource csYieldCurveDates
protected final ColumnSource csYieldCurveRates
protected final ColumnSource csCarryCurveDates
protected final ColumnSource csCarryCurveRates
protected final ColumnSource csCarryCurveErrors
public EquityFitDataManager(Supplier<DATATYPE> newEquityFitData, RowDataManager.LoadExtraColumns<DATATYPE> loadFitDataExtraColumns, DynamicTable data)
The input table must have the following columns:
- Timestamp: DBDateTime
- FitGroup: String
- UnderlyingId: long
- UnderlyingSym: String
- UnderlyingType: String
- UnderlyingBid: double
- UnderlyingAsk: double
- OptionId: DbLongArray
- OptionSym: DbArray
newEquityFitData
- function to create a new EquityFitData of the proper type.loadFitDataExtraColumns
- function to parse the data at a specific table index and load it into the EquityFitData.data
- data for fitting the option model.public DynamicTable table()
RowDataManager
table
in interface RowDataManager<FitScope,DATATYPE extends EquityFitData>
public DATATYPE newData()
RowDataManager
newData
in interface RowDataManager<FitScope,DATATYPE extends EquityFitData>
public FitScope uniqueIdCurrent(long index)
RowDataManager
This function should only be called during an update loop or while holding the LTM lock.
uniqueIdCurrent
in interface RowDataManager<FitScope,DATATYPE extends EquityFitData>
index
- table row index.public FitScope uniqueIdPrev(long index)
RowDataManager
This function should only be called during an update loop or while holding the LTM lock.
uniqueIdPrev
in interface RowDataManager<FitScope,DATATYPE extends EquityFitData>
index
- table row index.public double underlyingMidCurrent(long index)
index
- data row index.public void loadData(DATATYPE fitData, long index, boolean usePrev)
RowDataManager
This method should be called while the LTM lock is held. This can occur either during the update loop or the LTM lock can be acquired outside the update loop. If the LTM lock is not held, the loaded data can be inconsistent or corrupt.
loadData
in interface RowDataManager<FitScope,DATATYPE extends EquityFitData>
fitData
- data structure to populateindex
- table index of the row to load data fromusePrev
- use data from the previous table update