Class EquityFitDataManager<DATATYPE extends EquityFitData>
java.lang.Object
com.illumon.modelfarm.fitterfarm.equity.EquityFitDataManager<DATATYPE>
- Type Parameters:
DATATYPE
- data type
- All Implemented Interfaces:
RowDataManager<FitScope,
DATATYPE>
public class EquityFitDataManager<DATATYPE extends EquityFitData>
extends Object
implements RowDataManager<FitScope,DATATYPE>
Utility for accessing and querying equity fit data contained in a dynamic table.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.modelfarm.RowDataManager
RowDataManager.LoadExtraColumns<DATATYPE>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
protected final ColumnSource
-
Constructor Summary
ConstructorsConstructorDescriptionEquityFitDataManager
(Supplier<DATATYPE> newEquityFitData, RowDataManager.LoadExtraColumns<DATATYPE> loadFitDataExtraColumns, DynamicTable data) Create a multithreaded resource to fit a derivative model's parameters for equities. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Populates a data object with data from a table row.newData()
Creates a new data instance.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.uniqueIdCurrent
(long index) Gets the current unique identifier value for a row.uniqueIdPrev
(long index) Gets the previous unique identifier value for a row.
-
Field Details
-
csFitGroup
-
csTimestamp
-
csUnderlyingId
-
csUnderlyingSym
-
csUnderlyingType
-
csUnderlyingBid
-
csUnderlyingAsk
-
csUnderlyingLast
-
csUnderlyingBidSize
-
csUnderlyingAskSize
-
csUnderlyingBidGap
-
csUnderlyingAskGap
-
csOptionIds
-
csOptionSyms
-
csOptionRoots
-
csOptionPayoffTypes
-
csOptionExerciseTypes
-
csOptionSettlementTypes
-
csOptionExpirations
-
csOptionStrikes
-
csDivExDates
-
csDivCashAmounts
-
csDivProportionalAmounts
-
csYieldCurveDates
-
csYieldCurveRates
-
csCarryCurveDates
-
csCarryCurveRates
-
csCarryCurveErrors
-
-
Constructor Details
-
EquityFitDataManager
public EquityFitDataManager(Supplier<DATATYPE> newEquityFitData, RowDataManager.LoadExtraColumns<DATATYPE> loadFitDataExtraColumns, DynamicTable data) Create a multithreaded resource to fit a derivative model's parameters for equities.The input table must have the following columns:
- Timestamp: DBDateTime
- FitGroup: String
- UnderlyingId: long
- UnderlyingSym: String
- UnderlyingType: String
- UnderlyingBid: double
- UnderlyingAsk: double
- UnderlyingLast: double (optional)
- UnderlyingBidSize: double (optional)
- UnderlyingAskSize: double (optional)
- UnderlyingBidGap: double (optional)
- UnderlyingAskGap: double (optional)
- OptionId: DbLongArray
- OptionSym: DbArray<String>
- OptionRoot: DbArray<String> (optional)
- OptionPayoffType: DbArray<String>
- OptionExerciseType: DbArray<String>
- OptionExpiration: DbArray<DBDateTime>
- OptionStrike: DbDoubleArray
- DivExDate: DbArray<DBDateTime>
- DivCashAmount: DbDoubleArray
- DivProportionalAmount: DbDoubleArray
- YieldCurveDate: DbArray<DBDateTime>
- YieldCurveRate: DbArray<DBDateTime>
- CarryCurveDate: DbArray<DBDateTime>
- CarryCurveRate: DbDoubleArray
- CarryCurveError: DbDoubleArray
- Parameters:
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.
-
-
Method Details
-
table
Description copied from interface:RowDataManager
Gets the source table.- Specified by:
table
in interfaceRowDataManager<FitScope,
DATATYPE extends EquityFitData> - Returns:
- source table.
-
newData
Description copied from interface:RowDataManager
Creates a new data instance.- Specified by:
newData
in interfaceRowDataManager<FitScope,
DATATYPE extends EquityFitData> - Returns:
- new data instance.
-
uniqueIdCurrent
Description copied from interface:RowDataManager
Gets the current unique identifier value for a row.This function should only be called during an update loop or while holding the LTM lock.
- Specified by:
uniqueIdCurrent
in interfaceRowDataManager<FitScope,
DATATYPE extends EquityFitData> - Parameters:
index
- table row index.- Returns:
- current unique identifier for a row.
-
uniqueIdPrev
Description copied from interface:RowDataManager
Gets the previous unique identifier value for a row. One column of each table is designated as a unique identifier for data rows.This function should only be called during an update loop or while holding the LTM lock.
- Specified by:
uniqueIdPrev
in interfaceRowDataManager<FitScope,
DATATYPE extends EquityFitData> - Parameters:
index
- table row index.- Returns:
- previous underlying id.
-
underlyingMidCurrent
public double underlyingMidCurrent(long index) Gets the current mid market price for the underlying, or NULL if both the bid and ask are not present.- Parameters:
index
- data row index.- Returns:
- current mid market price for the underlying, or NULL if both the bid and ask are not present.
-
loadData
Description copied from interface:RowDataManager
Populates a data object with data from a table row.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.
- Specified by:
loadData
in interfaceRowDataManager<FitScope,
DATATYPE extends EquityFitData> - Parameters:
fitData
- data structure to populateindex
- table index of the row to load data fromusePrev
- use data from the previous table update
-