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::beta_calculator::BetaCalculator Class Reference

#include <beta_calculator.hpp>

Public Member Functions

 BetaCalculator () noexcept=default
 
std::optional< BetaVelocityResult > fromPriceVelocityOnline (const std::vector< double > &prices, double c_market=1.0) const noexcept
 Compute BetaVelocityResult from a streaming price series.
 

Detailed Description

Definition at line 108 of file beta_calculator.hpp.

Constructor & Destructor Documentation

◆ BetaCalculator()

srfm::beta_calculator::BetaCalculator::BetaCalculator ( )
defaultnoexcept

Member Function Documentation

◆ fromPriceVelocityOnline()

std::optional< BetaVelocityResult > srfm::beta_calculator::BetaCalculator::fromPriceVelocityOnline ( const std::vector< double > &  prices,
double  c_market = 1.0 
) const
noexcept

Compute BetaVelocityResult from a streaming price series.

Algorithm:

  1. Compute log-return velocities: v_i = ln(p_{i+1}/p_i) per time step.
  2. Compute mean velocity: v̄ = mean(v_i).
  3. Normalise: β = clamp(v̄ / c_market, −BETA_MAX_SAFE + ε, BETA_MAX_SAFE − ε).
  4. Compute derived quantities (γ, φ, D).
Parameters
pricesSequence of ≥2 positive, finite price observations.
c_marketMarket "speed of light" (normalisation constant > 0). Defaults to 1.0 (prices already in normalised units).
Returns
BetaVelocityResult, or std::nullopt if inputs are invalid.
Examples
/home/runner/work/Special-Relativity-in-Financial-Modeling/Special-Relativity-in-Financial-Modeling/src/beta_calculator/beta_calculator.hpp.

Definition at line 73 of file beta_calculator.cpp.


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