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::engine::NAssetEngine Class Reference

Full SRFM pipeline engine for N assets. More...

#include <n_asset_engine.hpp>

Public Member Functions

 NAssetEngine (AssetUniverse universe, EngineConfig cfg={}) noexcept
 Construct an engine for the given asset universe.
 
std::optional< std::monostate > ingest (std::span< const OHLCVBar > bars) noexcept
 Ingest one bar for every asset in the universe.
 
std::optional< EngineOutput > process () const noexcept
 Run the full pipeline on accumulated history.
 
std::optional< EngineOutput > ingest_and_process (std::span< const OHLCVBar > bars) noexcept
 Ingest bars then immediately process.
 
int n_assets () const noexcept
 Return the number of assets.
 
bool ready () const noexcept
 Return true if enough bars have been accumulated.
 

Detailed Description

Full SRFM pipeline engine for N assets.

Accumulates OHLCV bars, estimates covariance, builds an NAssetManifold, computes relativistic momenta, and classifies market regimes.

Definition at line 129 of file n_asset_engine.hpp.

Constructor & Destructor Documentation

◆ NAssetEngine()

srfm::engine::NAssetEngine::NAssetEngine ( AssetUniverse  universe,
EngineConfig  cfg = {} 
)
explicitnoexcept

Construct an engine for the given asset universe.

Parameters
universeThe set of assets (names must be non-empty).
cfgEngine configuration.

Definition at line 23 of file n_asset_engine.cpp.

Member Function Documentation

◆ ingest()

std::optional< std::monostate > srfm::engine::NAssetEngine::ingest ( std::span< const OHLCVBar >  bars)
noexcept

Ingest one bar for every asset in the universe.

Bars must be provided in the same order as universe.names. The bar is appended to the history ring buffer; if history exceeds lookback_bars * 2 the oldest entry is dropped.

Parameters
barsSpan of bars, one per asset (must have length n_assets()).
Returns
std::monostate on success, std::nullopt if bar count mismatches.

Definition at line 32 of file n_asset_engine.cpp.

◆ ingest_and_process()

std::optional< EngineOutput > srfm::engine::NAssetEngine::ingest_and_process ( std::span< const OHLCVBar >  bars)
noexcept

Ingest bars then immediately process.

Convenience wrapper: ingest(bars) followed by process().

Parameters
barsBars to ingest.
Returns
EngineOutput or std::nullopt.

Definition at line 260 of file n_asset_engine.cpp.

◆ n_assets()

int srfm::engine::NAssetEngine::n_assets ( ) const
inlinenoexcept

Return the number of assets.

Returns
universe_.n().

Definition at line 253 of file n_asset_engine.hpp.

◆ process()

std::optional< EngineOutput > srfm::engine::NAssetEngine::process ( ) const
noexcept

Run the full pipeline on accumulated history.

Requires ready() == true (at least lookback_bars entries in history).

Steps:

  1. Estimate covariance from log-returns.
  2. Build NAssetManifold.
  3. Compute per-asset β, γ, m_eff, p_rel, regime.
  4. Compute portfolio interval and regime.
Returns
EngineOutput, or std::nullopt if not ready or covariance fails.

Definition at line 166 of file n_asset_engine.cpp.

◆ ready()

bool srfm::engine::NAssetEngine::ready ( ) const
inlinenoexcept

Return true if enough bars have been accumulated.

Returns
history_.size() >= static_cast<size_t>(cfg_.lookback_bars).

Definition at line 257 of file n_asset_engine.hpp.


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