18#include "fastmm/core/engine_runner.hpp"
62 [[nodiscard]]
bool ok() const noexcept {
118 const BacktestConfig& cfg,
BacktestConfig: everything a run needs, assembled from the TOML sections [engine] [[instruments]] [st...
Definition params.hpp:102
Definition backtest_config.hpp:44
JournalInfo inspect_journal(const std::string &path)
Throws std::runtime_error when the file cannot be opened / validated.
std::string describe_outbound(const EventHeader &h)
One-line description of an Out* message (type, ids, side, price, quantity, stamp).
BacktestConfig journal_config(const std::string &path)
The configuration embedded in the journal.
ReplayResult replay_journal(const std::string &path, const BacktestConfig &cfg, const ReplayOptions &opt={})
cfg supplies the engine configuration and strategy parameters (it must match the recording run for a ...
Strategy parameter schema (8.6, ADR-0012).
Strategy registry (8.6, ADR-0012): name -> parameter schema + one factory per transport kind,...
Everything a factory needs that is backend-independent.
Definition registry.hpp:51
Definition backtest_config.hpp:80
std::uint16_t session_epoch
Definition replay.hpp:84
std::uint64_t outbound_messages
> 0 == session journal, 0 == market data only
Definition replay.hpp:80
std::string strategy
Definition replay.hpp:74
std::uint64_t replace_venues
Definition replay.hpp:86
std::uint32_t version
Definition replay.hpp:75
std::uint64_t messages
Definition replay.hpp:79
std::uint64_t market_data_messages
Definition replay.hpp:82
std::string strategy_meta
key=value lines about the strategy (empty: none)
Definition replay.hpp:89
bool complete
The file was closed cleanly: it ends in a trailer and no block was discarded.
Definition replay.hpp:73
bool has_session
v2 session settings below are valid
Definition replay.hpp:83
bool engine_time
the events carry the engine clock
Definition replay.hpp:87
std::int64_t start_ts
Definition replay.hpp:78
std::uint64_t rng_seed
Definition replay.hpp:76
bool quoting_enabled
Definition replay.hpp:85
std::uint64_t config_hash
Definition replay.hpp:77
std::string config_toml
embedded effective configuration (empty: none)
Definition replay.hpp:88
std::uint64_t dropped_outbound
of which the transport did not accept
Definition replay.hpp:81
bool param_updates
Apply the journal's ParamUpdate records, their fields matched to the strategy's parameters by name (f...
Definition replay.hpp:39
bool allow_incomplete
Replay a journal whose writer never closed it (no trailer) or whose last block is corrupt.
Definition replay.hpp:44
bool verify
compare every outbound message with the journal's Out* records
Definition replay.hpp:33
MsgRing * record_ring
Where the replayed engine puts its records (core/record_stream.hpp): the same fills,...
Definition replay.hpp:49
bool session_from_journal
Restore session epoch, quoting enabled, RNG seed and per-venue cancel-replace from a v2 header (a jou...
Definition replay.hpp:36
std::string strategy
empty -> the strategy recorded in the journal header
Definition replay.hpp:32
std::string expected_message
summaries at first_mismatch ("(none)" past the end)
Definition replay.hpp:60
bool incomplete
the journal has no trailer or a damaged tail block
Definition replay.hpp:63
bool session_restored
the header's session settings were applied
Definition replay.hpp:62
std::string strategy
Definition replay.hpp:53
std::uint64_t events
inbound events replayed
Definition replay.hpp:58
std::string outbound_sha256
what the replayed engine sent
Definition replay.hpp:54
bool ok() const noexcept
Definition replay.hpp:64
std::string recorded_sha256
the journal's Out* records
Definition replay.hpp:55
std::uint64_t outbound_messages
Definition replay.hpp:56
std::int64_t first_mismatch
index of the first differing message (verify only)
Definition replay.hpp:59
std::string actual_message
Definition replay.hpp:61
std::uint64_t recorded_messages
Definition replay.hpp:57
A strategy outside the registry (a Python hot strategy): the name for the result, the parameter schem...
Definition replay.hpp:95
std::string name
Definition replay.hpp:96
const ParamSchema * schema
Definition replay.hpp:97
std::function< std::unique_ptr< IEngineRunner >(RunnerDeps &deps)> make
Definition replay.hpp:98