18#include "fastmm/core/engine_runner.hpp"
57 [[nodiscard]]
bool ok() const noexcept {
113 const BacktestConfig& cfg,
BacktestConfig: everything a run needs, assembled from the TOML sections [engine] [[instruments]] [st...
Definition params.hpp:102
Definition backtest_config.hpp:39
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:48
std::uint16_t session_epoch
Definition replay.hpp:79
std::uint64_t outbound_messages
> 0 == session journal, 0 == market data only
Definition replay.hpp:75
std::string strategy
Definition replay.hpp:69
std::uint64_t replace_venues
Definition replay.hpp:81
std::uint32_t version
Definition replay.hpp:70
std::uint64_t messages
Definition replay.hpp:74
std::uint64_t market_data_messages
Definition replay.hpp:77
std::string strategy_meta
key=value lines about the strategy (empty: none)
Definition replay.hpp:84
bool complete
The file was closed cleanly: it ends in a trailer and no block was discarded.
Definition replay.hpp:68
bool has_session
v2 session settings below are valid
Definition replay.hpp:78
bool engine_time
the events carry the engine clock
Definition replay.hpp:82
std::int64_t start_ts
Definition replay.hpp:73
std::uint64_t rng_seed
Definition replay.hpp:71
bool quoting_enabled
Definition replay.hpp:80
std::uint64_t config_hash
Definition replay.hpp:72
std::string config_toml
embedded effective configuration (empty: none)
Definition replay.hpp:83
std::uint64_t dropped_outbound
of which the transport did not accept
Definition replay.hpp:76
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
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:55
bool incomplete
the journal has no trailer or a damaged tail block
Definition replay.hpp:58
bool session_restored
the header's session settings were applied
Definition replay.hpp:57
std::string strategy
Definition replay.hpp:48
std::uint64_t events
inbound events replayed
Definition replay.hpp:53
std::string outbound_sha256
what the replayed engine sent
Definition replay.hpp:49
bool ok() const noexcept
Definition replay.hpp:59
std::string recorded_sha256
the journal's Out* records
Definition replay.hpp:50
std::uint64_t outbound_messages
Definition replay.hpp:51
std::int64_t first_mismatch
index of the first differing message (verify only)
Definition replay.hpp:54
std::string actual_message
Definition replay.hpp:56
std::uint64_t recorded_messages
Definition replay.hpp:52
A strategy outside the registry (a Python hot strategy): the name for the result, the parameter schem...
Definition replay.hpp:90
std::string name
Definition replay.hpp:91
const ParamSchema * schema
Definition replay.hpp:92
std::function< std::unique_ptr< IEngineRunner >(RunnerDeps &deps)> make
Definition replay.hpp:93