|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
BacktestRunner (8.4): wires Engine<S, SimClock, SimTransport, InlineFeed> to a SimDriver and collects a BacktestResult. More...
#include "fastmm/backtest/backtest_config.hpp"#include "fastmm/backtest/data_source.hpp"#include "fastmm/backtest/result.hpp"#include "fastmm/backtest/synthetic_source.hpp"#include "fastmm/core/engine_runner.hpp"#include "fastmm/sim/sim_backend.hpp"#include "fastmm/strategies/registry.hpp"#include <memory>#include <string_view>Go to the source code of this file.
Classes | |
| class | fastmm::bt::BacktestSession |
| class | fastmm::bt::BacktestRunner< S > |
| Convenience wrapper that owns the config. More... | |
Namespaces | |
| namespace | fastmm |
| namespace | fastmm::bt |
Functions | |
| template<StrategyLike S> | |
| BacktestResult | fastmm::bt::run_backtest (const BacktestConfig &cfg, MdSource *source=nullptr) |
| BacktestResult | fastmm::bt::run_backtest (const BacktestConfig &cfg, std::string_view strategy, MdSource *source=nullptr) |
| Registry path (registers the built-in strategies first). | |
| SyntheticSourceConfig | fastmm::bt::synthetic_source_config (const BacktestConfig &cfg) |
The SyntheticSource a run with source == nullptr replays under the L2 queue fill model. | |
| std::unique_ptr< MdSource > | fastmm::bt::open_data (std::string_view spec, const InstrumentTable *instruments=nullptr) |
Resolves --data through the data-source registry (data_registry.hpp): "\<name\>:\<args\>", or a bare *.fmj / *.csv path. | |
| std::unique_ptr< MdSource > | fastmm::bt::open_source (const BacktestConfig &cfg) |
| Source for [backtest] source / path. | |
BacktestRunner (8.4): wires Engine<S, SimClock, SimTransport, InlineFeed> to a SimDriver and collects a BacktestResult.
Two entry points share one BacktestSession:
run_backtest<MyStrategy>(cfg, source) // template: no registration needed run_backtest(cfg, "basic_mm", source) // registry: apps, Python, sweeps
source == nullptr selects the synthetic market: with the matching fill model the MarketGenerator is coupled to the venue (strategy orders rest in the same book as the synthetic flow); with the L2 queue model a SyntheticSource stream is replayed exactly like historical data. A non-null source is read from its current position (reset() it first to reuse one).