![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The backtest engine: Backtester replays bars (and quotes) through the same Runner a live session uses. More...
#include "./clock.hpp"#include "./fill.hpp"#include "./ledger.hpp"#include "../runner/order_updates.hpp"#include "../runner/runner.hpp"#include <algotradelib/core>#include <algorithm>#include <charconv>#include <chrono>#include <cstddef>#include <cstdint>#include <iterator>#include <optional>#include <stdexcept>#include <string>#include <type_traits>#include <unordered_map>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | algotradelib::backtest::QueuedOrder< BrokerTag > |
| One order a replay accepted and has not yet filled or withdrawn. More... | |
| class | algotradelib::backtest::QueueingExecutor< BrokerTag > |
| The replay's executor: accepts orders and holds them until they fill or are withdrawn. More... | |
| class | algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue |
| Every outstanding order, oldest first: a view over the queue, valid until the queue changes. More... | |
| class | algotradelib::backtest::QueueingExecutor< BrokerTag >::Queue::const_iterator |
| Walks the outstanding orders, oldest first. More... | |
| struct | algotradelib::backtest::EquityPoint |
| One point on a replay's equity curve: per period end, or per bar (EquityCurve). More... | |
| struct | algotradelib::backtest::ReplayResult |
| Everything a replay produced; summarize turns it into a Report. More... | |
| struct | algotradelib::backtest::ReplayConfig |
| A replay's settings, besides the strategy and the bars. More... | |
| class | algotradelib::backtest::Backtester< Strategy, CapsType > |
| Replays bars (and quotes) through one strategy, with a ledger and a fill model. More... | |
| struct | algotradelib::backtest::Backtester< Strategy, CapsType >::InstrumentSlot::ByInterval |
| What is kept per interval of the instrument. More... | |
Namespaces | |
| namespace | algotradelib |
| The library: broker-neutral types (core), and the modules below. | |
| namespace | algotradelib::backtest |
| Replays a strategy over stored bars: fill and cost models, the replay ledger, and the report. | |
Enumerations | |
| enum class | algotradelib::backtest::EquityCurve { algotradelib::backtest::PER_PERIOD , algotradelib::backtest::PER_BAR , algotradelib::backtest::NONE } |
| Which points a replay records on its equity curve (ReplayResult::equity_); see ReplayConfig::equity_curve_. More... | |
The backtest engine: Backtester replays bars (and quotes) through the same Runner a live session uses.
An order decided on bar n is queued and filled against bar n+1 or later, never the bar it was decided on. Nothing assumes a bar is a day: the same engine replays intraday and daily bars.
Definition in file engine.hpp.