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 | Static Public Member Functions | List of all members
srfm::lorentz::LorentzTransform Class Reference

#include <lorentz_transform.hpp>

Public Member Functions

 LorentzTransform ()=delete
 

Static Public Member Functions

static bool isValidBeta (double beta) noexcept
 
static std::optional< LorentzFactor > gamma (BetaVelocity beta) noexcept
 
static std::optional< double > dilateTime (double proper_time, BetaVelocity beta) noexcept
 
static std::optional< RelativisticSignal > applyMomentumCorrection (double raw_signal, BetaVelocity beta, double effective_mass) noexcept
 
static BetaVelocity composeVelocities (BetaVelocity beta1, BetaVelocity beta2) noexcept
 
static std::optional< double > inverseTransform (double dilated_value, BetaVelocity beta) noexcept
 
static std::optional< double > contractLength (double proper_length, BetaVelocity beta) noexcept
 
static std::optional< double > rapidity (BetaVelocity beta) noexcept
 
static std::optional< double > totalEnergy (BetaVelocity beta, double effective_mass, double c_market=constants::SPEED_OF_INFORMATION) noexcept
 

Detailed Description

Lorentz Transform Engine.

Static utility class providing all core special-relativistic transforms expressed in terms of the normalised velocity parameter β.

Definition at line 43 of file lorentz_transform.hpp.

Constructor & Destructor Documentation

◆ LorentzTransform()

srfm::lorentz::LorentzTransform::LorentzTransform ( )
delete

Member Function Documentation

◆ applyMomentumCorrection()

std::optional< RelativisticSignal > srfm::lorentz::LorentzTransform::applyMomentumCorrection ( double  raw_signal,
BetaVelocity  beta,
double  effective_mass 
)
staticnoexcept

Apply relativistic momentum correction: p = γ · m_eff · raw_signal.

The relativistic momentum analog amplifies signals proportionally to γ. In the Newtonian limit (β → 0) this reduces to classical momentum p = m_eff · raw_signal.

Arguments

  • raw_signal — Unscaled signal value (any finite double)
  • beta — Normalised market velocity
  • effective_mass — Liquidity-proxy mass parameter (must be > 0)

Returns

  • Some(signal) with adjusted_value = γ · m_eff · raw_signal
  • None if effective_mass ≤ 0 or β is invalid

Definition at line 58 of file lorentz_transform.cpp.

◆ composeVelocities()

BetaVelocity srfm::lorentz::LorentzTransform::composeVelocities ( BetaVelocity  beta1,
BetaVelocity  beta2 
)
staticnoexcept

Relativistic velocity addition: β_total = (β₁ + β₂) / (1 + β₁β₂).

Composes two market velocities according to the relativistic addition law. Guarantees |β_total| < 1 when |β₁|, |β₂| < 1, preserving the sub-luminal constraint even for large individual velocities.

This is not approximate: it is the exact special-relativistic formula.

Arguments

  • beta1, beta2 — Two market velocities to compose

Returns

The composed velocity. Always sub-luminal if inputs are sub-luminal.

Definition at line 84 of file lorentz_transform.cpp.

◆ contractLength()

std::optional< double > srfm::lorentz::LorentzTransform::contractLength ( double  proper_length,
BetaVelocity  beta 
)
staticnoexcept

Apply length contraction: L = L₀ / γ.

In the financial analogy: the "length" of a price move (e.g. a spread or range) contracts in the observer frame when the market is moving.

Arguments

  • proper_length — Rest-frame length (must be > 0)
  • beta — Normalised market velocity

Returns

  • Some(L) with 0 < L ≤ proper_length
  • None if proper_length ≤ 0 or β is invalid

Definition at line 118 of file lorentz_transform.cpp.

◆ dilateTime()

std::optional< double > srfm::lorentz::LorentzTransform::dilateTime ( double  proper_time,
BetaVelocity  beta 
)
staticnoexcept

Apply time dilation: t_dilated = γ · τ_proper.

In the financial context: a signal's effective age is stretched by γ in a fast-moving market, making it appear more recent and more relevant.

Arguments

  • proper_time — Signal age in the market's rest frame (must be ≥ 0)
  • beta — Normalised market velocity

Returns

Definition at line 40 of file lorentz_transform.cpp.

◆ gamma()

std::optional< LorentzFactor > srfm::lorentz::LorentzTransform::gamma ( BetaVelocity  beta)
staticnoexcept

Compute the Lorentz factor γ = 1 / √(1 − β²).

At β = 0: γ = 1 (Newtonian limit — no relativistic correction). At β → 1: γ → ∞ (signals infinitely amplified in the market frame).

Returns

  • Some(γ) with γ ≥ 1.0 for valid β
  • None if β is invalid (|β| ≥ 1, NaN, or ±∞)

Definition at line 20 of file lorentz_transform.cpp.

◆ inverseTransform()

std::optional< double > srfm::lorentz::LorentzTransform::inverseTransform ( double  dilated_value,
BetaVelocity  beta 
)
staticnoexcept

Recover the proper value from a dilated value: τ = t / γ.

Inverse of dilateTime. Useful for converting a gamma-weighted indicator back to its raw frame value.

Returns

  • Some(τ) = dilated_value / γ
  • None if β is invalid

Definition at line 105 of file lorentz_transform.cpp.

◆ isValidBeta()

bool srfm::lorentz::LorentzTransform::isValidBeta ( double  beta)
staticnoexcept

Return true if β is finite and strictly within the safe range.

Valid range: |β| < BETA_MAX_SAFE (= 0.9999). NaN, ±infinity, and |β| ≥ 1 are all invalid.

Definition at line 12 of file lorentz_transform.cpp.

◆ rapidity()

std::optional< double > srfm::lorentz::LorentzTransform::rapidity ( BetaVelocity  beta)
staticnoexcept

Compute rapidity: φ = atanh(β).

Rapidity is additive under velocity composition: φ(β₁ ⊕ β₂) = φ(β₁) + φ(β₂)

This makes rapidity the natural coordinate for combining market velocity signals from multiple assets.

Returns

  • Some(φ) ∈ (−∞, +∞)
  • None if β is invalid (|β| ≥ 1 makes atanh undefined)

Definition at line 137 of file lorentz_transform.cpp.

◆ totalEnergy()

std::optional< double > srfm::lorentz::LorentzTransform::totalEnergy ( BetaVelocity  beta,
double  effective_mass,
double  c_market = constants::SPEED_OF_INFORMATION 
)
staticnoexcept

Compute relativistic energy: E = γ · m_eff · c²_market.

Total relativistic energy (rest + kinetic) in the financial frame. Rest energy E₀ = m_eff · c²_market (baseline liquidity × volatility).

Arguments

  • beta — Normalised market velocity
  • effective_mass — Liquidity-proxy mass (must be > 0)
  • c_market — Speed of information (default = SPEED_OF_INFORMATION)

Returns

  • Some(E) ≥ E₀
  • None if effective_mass ≤ 0 or β is invalid

Definition at line 153 of file lorentz_transform.cpp.


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