|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Event-Driven Backtester — Round 3 addition. More...
#include "srfm/manifold.hpp"#include "srfm/types.hpp"#include "srfm/constants.hpp"#include <cmath>#include <functional>#include <map>#include <memory>#include <optional>#include <queue>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | srfm::event_bt::BacktestEvent |
| A single market event with a timestamp. More... | |
| struct | srfm::event_bt::Order |
| An order emitted by a Strategy in response to a market event. More... | |
| struct | srfm::event_bt::Fill |
| Confirmation of an executed order. More... | |
| struct | srfm::event_bt::Portfolio |
| Running portfolio state tracked by BacktestEngine. More... | |
| struct | srfm::event_bt::BacktestResult |
| Aggregate performance statistics from a completed backtest. More... | |
| class | srfm::event_bt::Strategy |
| Abstract strategy interface. Subclass and override the virtual methods. More... | |
| class | srfm::event_bt::BacktestEngine |
| class | srfm::event_bt::RelativisticStrategy |
Namespaces | |
| namespace | srfm |
| namespace | srfm::event_bt |
Enumerations | |
| enum class | srfm::event_bt::EventType { srfm::event_bt::Trade , srfm::event_bt::Quote , srfm::event_bt::Bar } |
| enum class | srfm::event_bt::OrderSide { srfm::event_bt::Buy , srfm::event_bt::Sell } |
| enum class | srfm::event_bt::OrderType { srfm::event_bt::Market , srfm::event_bt::Limit } |
Event-Driven Backtester — Round 3 addition.
Provide a lightweight event queue-based simulation engine that replays market events in strict timestamp order and passes them to a pluggable Strategy. All trade fills, portfolio accounting, and performance metrics are tracked internally.
BacktestEvent → priority_queue → BacktestEngine → Strategy::on_trade / on_bar → optional<Order> → simulated Fill → Portfolio update → BacktestResult
A concrete Strategy subclass that uses SpacetimeInterval::classify() to filter trades. Only trades that are TIMELIKE relative to the previous filled trade are accepted — spacelike jumps are treated as noise and rejected.
Definition in file event_backtester.hpp.