Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Classes | Namespaces
coordinate_normalizer.hpp File Reference

Rolling-window z-score normaliser for tick close prices. More...

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <stdexcept>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  srfm::stream::CoordinateNormalizer
 Rolling z-score normaliser using Welford's online algorithm. More...
 

Namespaces

namespace  srfm
 
namespace  srfm::stream
 

Detailed Description

Rolling-window z-score normaliser for tick close prices.

Module: include/srfm/stream/ Owner: AGT-10 (Builder) — 2026-03-01

Responsibility

Map raw close prices into a normalised coordinate space using a rolling Welford online mean/variance estimator over a configurable window.

normalised = (close − μ_window) / σ_window

This dimensionless coordinate feeds into BetaCalculator and LorentzTransform, ensuring the relativistic machinery operates on unit-free quantities.

Guarantees

• Online: O(1) per tick, no recomputation over the full window. • Bounded: memory is exactly window * sizeof(double) + a few scalars. • Zero-allocation: circular buffer is pre-allocated at construction. • Non-throwing: update() and normalise() are noexcept. • Pre-warm: returns 0.0 until window is full (conservative).

NOT Responsible For

• Cross-field normalisation (high/low/volume normalised separately if needed) • Persistence or serialisation of the rolling state • Thread safety — single-threaded use only

Definition in file coordinate_normalizer.hpp.