|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Implementation of ExtendedBacktester with GEODESIC_DEVIATION strategy. More...
#include "srfm/geodesic_strategy.hpp"#include "srfm/constants.hpp"#include <algorithm>#include <cmath>#include <numeric>#include <sstream>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | srfm |
| namespace | srfm::backtest |
Implementation of ExtendedBacktester with GEODESIC_DEVIATION strategy.
Extends the Backtester to support three strategy modes: RAW — classical baseline (unit position) RELATIVISTIC — Lorentz-corrected γ-scaled position (original Backtester) GEODESIC_DEVIATION — long when deviation > rolling p75 (mean-reversion)
The geodesic deviation strategy encodes the hypothesis: "When the market has been pulled far from its natural geodesic path, expect mean reversion back toward the geodesic." Concretely: position = 1 when deviation_i > p75 of the last W bars; otherwise position = 0 (flat, no short).
Definition in file geodesic_strategy.cpp.