Class FuturesPrioritizer<DATATYPE extends FuturesFitData>
java.lang.Object
com.illumon.modelfarm.fitterfarm.futures.FuturesPrioritizer<DATATYPE>
- Type Parameters:
DATATYPE- data type
- All Implemented Interfaces:
ExecPrioritizer<FitScope,DATATYPE, FuturesFitDataManager<DATATYPE>>
public class FuturesPrioritizer<DATATYPE extends FuturesFitData>
extends Object
implements ExecPrioritizer<FitScope,DATATYPE,FuturesFitDataManager<DATATYPE>>
A utility for prioritizing the processing of new data to fit.
Underlying changes above a threshold are escalated to a high priority.
-
Constructor Summary
ConstructorsConstructorDescriptionFuturesPrioritizer(double highPriorityUnderlyingChange) Creates a new prioritizer for futures. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecHappened(FuturesFitData data) A new execution happened using this row data.intpriority(FuturesFitDataManager dataManager, long index) Compute the priority for processing the data at the indicated table index.
-
Constructor Details
-
FuturesPrioritizer
public FuturesPrioritizer(double highPriorityUnderlyingChange) Creates a new prioritizer for futures.- Parameters:
highPriorityUnderlyingChange- underlying relative price changes greater than this threashold are refit with a high priority. For example, 0.02 for 2%.
-
-
Method Details
-
priority
Description copied from interface:ExecPrioritizerCompute the priority for processing the data at the indicated table index.- Specified by:
priorityin interfaceExecPrioritizer<FitScope,DATATYPE extends FuturesFitData, FuturesFitDataManager<DATATYPE extends FuturesFitData>> - Parameters:
dataManager- interface for accessing and querying data contained in rows of a dynamic table.index- index of the data in the fit data manager source table.- Returns:
- priority of processing the data at the indicated index. Higher numbers are higher priority.
-
execHappened
Description copied from interface:ExecPrioritizerA new execution happened using this row data.- Specified by:
execHappenedin interfaceExecPrioritizer<FitScope,DATATYPE extends FuturesFitData, FuturesFitDataManager<DATATYPE extends FuturesFitData>> - Parameters:
data- data used in the execution.
-