#include <fastmm/backtest/journal_source.hpp>
|
| | JournalSource (const std::string &path, bool strip_own=false, bool parts=true, const InstrumentTable *remap=nullptr) |
| | Throws std::runtime_error if a file cannot be opened/validated.
|
| |
| const EventHeader * | next () override |
| |
| void | reset () override |
| |
| Timestamp | start_ts () const override |
| |
| const JournalReader & | reader () const noexcept |
| | The first part: its header, instrument table and configuration are every part's.
|
| |
| const std::vector< std::string > & | paths () const noexcept |
| | The files read, in order; the first is path.
|
| |
| std::size_t | seq_gaps () const noexcept |
| | Parts whose first sequence number did not follow the previous part's last.
|
| |
| std::size_t | md_events () const noexcept |
| |
| const OwnOrderStripper * | stripper () const noexcept |
| | Null unless strip_own.
|
| |
| std::size_t | dropped () const noexcept |
| | remap: events dropped so far because the configuration lacks their symbol.
|
| |
| std::string | note () const override |
| |
| const sim::RecordedSession * | recorded () const override |
| | What the parts say about the session (sim/recorded_session.hpp): its states and checkpoints (journal_state.hpp), the positions reconciled before its first order, its ParamUpdate records with the first part's parameter table, its balance rows (account rows, kAccount, left out) and its flows, and its recorded latencies.
|
| |
|
| static bool | is_market_data (EventType t) noexcept |
| |
| static bool | own_ticker (const EventHeader &h) noexcept |
| | A ticker a backtest's simulated venue sent because our order changed the touch: ours, as the journal's OwnLevels records are, not the market's.
|
| |
◆ JournalSource()
| fastmm::bt::JournalSource::JournalSource |
( |
const std::string & |
path, |
|
|
bool |
strip_own = false, |
|
|
bool |
parts = true, |
|
|
const InstrumentTable * |
remap = nullptr |
|
) |
| |
|
explicit |
Throws std::runtime_error if a file cannot be opened/validated.
parts = false reads path alone. remap: the configuration's instrument table (see above); null leaves the ids as recorded.
◆ next()
| const EventHeader * fastmm::bt::JournalSource::next |
( |
| ) |
|
|
override |
◆ reset()
| void fastmm::bt::JournalSource::reset |
( |
| ) |
|
|
override |
◆ start_ts()
| Timestamp fastmm::bt::JournalSource::start_ts |
( |
| ) |
const |
|
inlineoverride |
◆ reader()
| const JournalReader & fastmm::bt::JournalSource::reader |
( |
| ) |
const |
|
inlinenoexcept |
The first part: its header, instrument table and configuration are every part's.
◆ paths()
| const std::vector< std::string > & fastmm::bt::JournalSource::paths |
( |
| ) |
const |
|
inlinenoexcept |
The files read, in order; the first is path.
◆ seq_gaps()
| std::size_t fastmm::bt::JournalSource::seq_gaps |
( |
| ) |
const |
|
inlinenoexcept |
Parts whose first sequence number did not follow the previous part's last.
◆ md_events()
| std::size_t fastmm::bt::JournalSource::md_events |
( |
| ) |
const |
|
inlinenoexcept |
◆ stripper()
| const OwnOrderStripper * fastmm::bt::JournalSource::stripper |
( |
| ) |
const |
|
inlinenoexcept |
◆ dropped()
| std::size_t fastmm::bt::JournalSource::dropped |
( |
| ) |
const |
|
inlinenoexcept |
remap: events dropped so far because the configuration lacks their symbol.
◆ note()
| std::string fastmm::bt::JournalSource::note |
( |
| ) |
const |
|
override |
◆ recorded()
| const sim::RecordedSession * fastmm::bt::JournalSource::recorded |
( |
| ) |
const |
|
inlineoverride |
What the parts say about the session (sim/recorded_session.hpp): its states and checkpoints (journal_state.hpp), the positions reconciled before its first order, its ParamUpdate records with the first part's parameter table, its balance rows (account rows, kAccount, left out) and its flows, and its recorded latencies.
With remap, their instruments are the configuration's, and an account's venue that of the first mapped instrument the journal lists on it (a venue with none keeps its id); a latency of an instrument the configuration lacks is dropped.
◆ is_market_data()
| static bool fastmm::bt::JournalSource::is_market_data |
( |
EventType |
t | ) |
|
|
inlinestaticnoexcept |
◆ own_ticker()
| static bool fastmm::bt::JournalSource::own_ticker |
( |
const EventHeader & |
h | ) |
|
|
inlinestaticnoexcept |
A ticker a backtest's simulated venue sent because our order changed the touch: ours, as the journal's OwnLevels records are, not the market's.