FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::bt::BacktestResult Struct Reference

#include <fastmm/backtest/result.hpp>

Public Member Functions

const Metrics & summary () const noexcept
 
bool killed () const noexcept
 Whether the global kill switch stopped the run ([risk] max_loss, a failing hook, ...), and when: seconds of simulated time after start_ts.
 
double kill_at_s () const noexcept
 
std::string summary_table () const
 Human-readable table, one metric per line.
 
std::string summary_json () const
 
std::string equity_csv () const
 
std::string fills_csv () const
 
std::string orders_csv () const
 
std::string transfers_csv () const
 One row per simulated transfer: ts_ns,from,to,asset,amount,state,client_id.
 
bool write_all (const std::string &dir) const
 Writes equity.csv, fills.csv, orders.csv and summary.json into dir (created if needed), and transfers.csv with a pool treasury.
 

Public Attributes

std::string strategy
 
ParamMap params
 
std::uint64_t seed = 0
 
FillRows fills
 
EquityRows equity
 
OrderRows orders
 
Metrics metrics
 
RunnerStats engine
 the engine's own counters and positions
 
sim::SimTransportStats transport
 
std::string outbound_sha256
 
std::uint64_t outbound_messages = 0
 
std::uint64_t md_events = 0
 market-data messages delivered to the engine
 
std::uint64_t md_reordered = 0
 Recorded events the venue took ahead of one recorded before them (venue-time order), and those that still came after a later-stamped one (received more than reorder_window_ms late).
 
std::uint64_t md_late = 0
 
std::uint64_t engine_steps = 0
 
std::int64_t start_ts = 0
 
std::int64_t end_ts = 0
 
double wall_seconds = 0.0
 
std::vector< SlowMethodTiming > slow_methods
 Slow methods of a Python strategy (the Python package fills this in; empty otherwise).
 
BacktestTreasury treasury
 The pool treasuries; pools is 0 without one.
 

Member Function Documentation

◆ summary()

const Metrics & fastmm::bt::BacktestResult::summary ( ) const
inlinenoexcept

◆ killed()

bool fastmm::bt::BacktestResult::killed ( ) const
inlinenoexcept

Whether the global kill switch stopped the run ([risk] max_loss, a failing hook, ...), and when: seconds of simulated time after start_ts.

◆ kill_at_s()

double fastmm::bt::BacktestResult::kill_at_s ( ) const
inlinenoexcept

◆ summary_table()

std::string fastmm::bt::BacktestResult::summary_table ( ) const

Human-readable table, one metric per line.

◆ summary_json()

std::string fastmm::bt::BacktestResult::summary_json ( ) const

◆ equity_csv()

std::string fastmm::bt::BacktestResult::equity_csv ( ) const

◆ fills_csv()

std::string fastmm::bt::BacktestResult::fills_csv ( ) const

◆ orders_csv()

std::string fastmm::bt::BacktestResult::orders_csv ( ) const

◆ transfers_csv()

std::string fastmm::bt::BacktestResult::transfers_csv ( ) const

One row per simulated transfer: ts_ns,from,to,asset,amount,state,client_id.

◆ write_all()

bool fastmm::bt::BacktestResult::write_all ( const std::string &  dir) const

Writes equity.csv, fills.csv, orders.csv and summary.json into dir (created if needed), and transfers.csv with a pool treasury.

Returns false on I/O failure.

Member Data Documentation

◆ strategy

std::string fastmm::bt::BacktestResult::strategy

◆ params

ParamMap fastmm::bt::BacktestResult::params

◆ seed

std::uint64_t fastmm::bt::BacktestResult::seed = 0

◆ fills

FillRows fastmm::bt::BacktestResult::fills

◆ equity

EquityRows fastmm::bt::BacktestResult::equity

◆ orders

OrderRows fastmm::bt::BacktestResult::orders

◆ metrics

Metrics fastmm::bt::BacktestResult::metrics

◆ engine

RunnerStats fastmm::bt::BacktestResult::engine

the engine's own counters and positions

◆ transport

sim::SimTransportStats fastmm::bt::BacktestResult::transport

◆ outbound_sha256

std::string fastmm::bt::BacktestResult::outbound_sha256

◆ outbound_messages

std::uint64_t fastmm::bt::BacktestResult::outbound_messages = 0

◆ md_events

std::uint64_t fastmm::bt::BacktestResult::md_events = 0

market-data messages delivered to the engine

◆ md_reordered

std::uint64_t fastmm::bt::BacktestResult::md_reordered = 0

Recorded events the venue took ahead of one recorded before them (venue-time order), and those that still came after a later-stamped one (received more than reorder_window_ms late).

◆ md_late

std::uint64_t fastmm::bt::BacktestResult::md_late = 0

◆ engine_steps

std::uint64_t fastmm::bt::BacktestResult::engine_steps = 0

◆ start_ts

std::int64_t fastmm::bt::BacktestResult::start_ts = 0

◆ end_ts

std::int64_t fastmm::bt::BacktestResult::end_ts = 0

◆ wall_seconds

double fastmm::bt::BacktestResult::wall_seconds = 0.0

◆ slow_methods

std::vector<SlowMethodTiming> fastmm::bt::BacktestResult::slow_methods

Slow methods of a Python strategy (the Python package fills this in; empty otherwise).

◆ treasury

BacktestTreasury fastmm::bt::BacktestResult::treasury

The pool treasuries; pools is 0 without one.