Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Public Member Functions | List of all members
srfm::core::Engine Class Reference

Orchestrates the full relativistic signal-processing pipeline. More...

#include <engine.hpp>

Public Member Functions

 Engine (EngineConfig config=EngineConfig{})
 Construct with optional configuration.
 
std::optional< backtest::BacktestComparison > run_backtest (std::span< const OHLCV > bars) const noexcept
 
std::optional< PipelineBar > process_stream_bar (const OHLCV &bar) noexcept
 
void reset_stream () noexcept
 Reset streaming state (clear internal bar window).
 
std::span< const OHLCV > stream_window () const noexcept
 Return a read-only view of the current streaming bar window.
 

Detailed Description

Orchestrates the full relativistic signal-processing pipeline.

Definition at line 88 of file engine.hpp.

Constructor & Destructor Documentation

◆ Engine()

srfm::core::Engine::Engine ( EngineConfig  config = EngineConfig{})
explicit

Construct with optional configuration.

Definition at line 20 of file engine.cpp.

Member Function Documentation

◆ process_stream_bar()

std::optional< PipelineBar > srfm::core::Engine::process_stream_bar ( const OHLCV &  bar)
noexcept

Process a single bar in streaming mode, updating internal rolling state.

Returns the PipelineBar result for the just-processed bar, or nullopt if the internal window has fewer than 2 bars (warm-up phase).

Definition at line 84 of file engine.cpp.

◆ reset_stream()

void srfm::core::Engine::reset_stream ( )
noexcept

Reset streaming state (clear internal bar window).

Definition at line 146 of file engine.cpp.

◆ run_backtest()

std::optional< backtest::BacktestComparison > srfm::core::Engine::run_backtest ( std::span< const OHLCV >  bars) const
noexcept

Run a complete backtest on a sequence of OHLCV bars.

Pipeline

  1. Compute close-to-close simple returns.
  2. Compute β for each bar via BetaCalculator (rolling window = 5 bars).
  3. Classify each bar's spacetime interval via MarketManifold.
  4. Apply relativistic momentum corrections.
  5. Feed BarData + returns into Backtester::run().

Returns

nullopt if fewer than config.min_bars bars provided, fewer than MIN_RETURN_SERIES_LENGTH returns result (N bars give N - 1 returns), or any downstream computation is numerically degenerate.

Definition at line 27 of file engine.cpp.

◆ stream_window()

std::span< const OHLCV > srfm::core::Engine::stream_window ( ) const
noexcept

Return a read-only view of the current streaming bar window.

Definition at line 152 of file engine.cpp.


The documentation for this class was generated from the following files: