FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::bt::JournalSource Class Referencefinal

#include <fastmm/backtest/journal_source.hpp>

Inheritance diagram for fastmm::bt::JournalSource:

Public Member Functions

 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 std::vector< sim::SimAccountConfig > * balance_snapshots () const override
 The first balance snapshot the journal recorded for each venue (the BalanceMsg rows from its first kSnapshot message to the kSnapshotEnd), each asset at its total; account rows (kAccount) are left out.
 
const sim::SessionStart * session_start () const override
 journal_start_state() of the parts read (journal_state.hpp).
 
const sim::RecordedParams * recorded_params () const override
 Its ParamUpdate records and the first part's parameter table.
 

Static Public Member Functions

static bool is_market_data (EventType t) noexcept
 

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ 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

Null unless strip_own.

◆ 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

◆ balance_snapshots()

const std::vector< sim::SimAccountConfig > * fastmm::bt::JournalSource::balance_snapshots ( ) const
inlineoverride

The first balance snapshot the journal recorded for each venue (the BalanceMsg rows from its first kSnapshot message to the kSnapshotEnd), each asset at its total; account rows (kAccount) are left out.

Empty when the journal has none.

◆ session_start()

const sim::SessionStart * fastmm::bt::JournalSource::session_start ( ) const
inlineoverride

journal_start_state() of the parts read (journal_state.hpp).

◆ recorded_params()

const sim::RecordedParams * fastmm::bt::JournalSource::recorded_params ( ) const
inlineoverride

Its ParamUpdate records and the first part's parameter table.

◆ is_market_data()

static bool fastmm::bt::JournalSource::is_market_data ( EventType  t)
inlinestaticnoexcept