|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
extract_features(): drives an MdSource into the engine's own L2Book and emits a FeatureTable. More...
#include "fastmm/core/time.hpp"#include "fastmm/research/feature_table.hpp"#include "fastmm/sim/md_source.hpp"#include <cstddef>#include <cstdint>#include <vector>Go to the source code of this file.
Classes | |
| struct | fastmm::research::FeatureConfig |
Namespaces | |
| namespace | fastmm |
| namespace | fastmm::research |
Functions | |
| std::vector< Duration > | fastmm::research::default_horizons () |
| kDefaultHorizonsNs as Durations. | |
| FeatureTable | fastmm::research::extract_features (MdSource &source, const FeatureConfig &cfg={}) |
Reads source from its current position to the end. | |
extract_features(): drives an MdSource into the engine's own L2Book and emits a FeatureTable.
The book is the one the simulated venue keeps under FillModel::L2Queue (sim/sim_transport.cpp, queue_on_delta): BookDelta and BookSnapshot are applied, trades are not. So the mid of a row and its forward mids are the same numbers SimTransport::venue_mid() reports at those times, and a fill of a backtest over the same data can be joined to this table by timestamp.
One pass, no look-ahead. Forward mids are resolved by a rule that reads the book only at times the data has already reached:
on an event at time t, before applying it, resolve every pending row whose ts + h < t; at the end of the data, resolve every pending row whose ts + h <= the last event time.
So a row's value at horizon h is the book after every event at or before ts + h and no other - the same state run_until(ts + h) leaves the venue in. A row whose ts + h is past the last event stays unset and is counted in HorizonCoverage::excluded_past_end.