FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
data_source.hpp File Reference

DataSource (8.4): a timestamp-ordered stream of normalized market-data events consumed by the simulator. More...

#include "fastmm/core/messages.hpp"
#include "fastmm/core/time.hpp"
#include "fastmm/sim/md_source.hpp"
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
#include <vector>

Go to the source code of this file.

Classes

struct  fastmm::bt::Row
 
class  fastmm::bt::RowAssembler
 Builds messages from a row stream. Provider is bool(Row&) returning false at end. More...
 
class  fastmm::bt::ChainSource
 Concatenation of sources that cover consecutive spans of time (one file per day). More...
 
class  fastmm::bt::TimeSliceSource
 The events of inner in [t0, t1) of event time (exch_ts, recv_ts when unset), for walk-forward folds. More...
 
class  fastmm::bt::MergedSource
 k-way merge of several sources by event time (stable: lower source index first on ties). More...
 
class  fastmm::bt::OwnedMergedSource
 MergedSource over sources it owns: open_data() of several specs ("a; b"), one per venue. More...
 

Namespaces

namespace  fastmm
 
namespace  fastmm::bt
 

Concepts

concept  fastmm::bt::DataSourceLike
 

Enumerations

enum class  fastmm::bt::RowType : std::uint8_t { fastmm::bt::Snapshot = 0 , fastmm::bt::Delta = 1 , fastmm::bt::Trade = 2 , fastmm::bt::Ticker = 3 }
 

Detailed Description

DataSource (8.4): a timestamp-ordered stream of normalized market-data events consumed by the simulator.

Every source implements sim::MdSource (a virtual next()/reset() pair; one virtual call per event is noise next to the engine step) and satisfies the DataSourceLike concept. Row-based sources (CSV, arrays) share RowAssembler, which groups consecutive rows of one update into a single BookDelta/BookSnapshot message.

Row format (CSV columns / array dtypes): ts_ns int64 event time type S | D | T | B (0 | 1 | 2 | 3 in arrays): snapshot level, delta level, trade, book ticker (two rows: bid then ask) inst uint32 dense instrument id side B | A (0 | 1): bid/ask, or the aggressor side for trades price decimal string / int64 raw 1e-8 / double qty decimal string / int64 raw 1e-8 / double (0 == delete level) seq uint64 venue update id; consecutive S/D rows with equal (ts, inst, seq) form one message