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::tensor::GeodesicDeviationCalculator Class Reference

#include <geodesic_signal.hpp>

Public Member Functions

 GeodesicDeviationCalculator (const MetricTensor &metric, double step_size=constants::DEFAULT_GEODESIC_STEP) noexcept
 
std::vector< GeodesicSignal > compute (const std::vector< manifold::SpacetimeEvent > &events) const noexcept
 

Detailed Description

Computes geodesic deviation for a sequence of market events.

Algorithm

  1. Convert the sequence of SpacetimeEvent objects into SpacetimePoints.
  2. Estimate an initial four-velocity u₀ from the first two events.
  3. Integrate the geodesic equation from x₀ for (n−1) steps via RK4.
  4. At each bar i, compute spatial deviation: dev_i = (actual_spatial_i − geodesic_spatial_i).norm() where spatial components are indices [1, 2, 3].

Example

std::vector<srfm::manifold::SpacetimeEvent> events = ...;
auto signals = calc.compute(events);
for (std::size_t i = 0; i < signals.size(); ++i) {
if (signals[i].is_valid) {
fmt::print("bar {} deviation = {:.4f}\n", i, signals[i].geodesic_deviation);
}
}
static MetricTensor make_minkowski(double time_scale=1.0, double spatial_scale=1.0)

Panics

This class never panics.

Definition at line 82 of file geodesic_signal.hpp.

Constructor & Destructor Documentation

◆ GeodesicDeviationCalculator()

srfm::tensor::GeodesicDeviationCalculator::GeodesicDeviationCalculator ( const MetricTensor &  metric,
double  step_size = constants::DEFAULT_GEODESIC_STEP 
)
explicitnoexcept

Construct with a metric tensor and RK4 proper-time step.

Arguments

  • metric — Position-dependent metric encoding market covariance
  • step_size — Proper-time step dτ for geodesic integration

Definition at line 25 of file geodesic_signal.cpp.

Member Function Documentation

◆ compute()

std::vector< GeodesicSignal > srfm::tensor::GeodesicDeviationCalculator::compute ( const std::vector< manifold::SpacetimeEvent > &  events) const
noexcept

Compute geodesic deviation for a sequence of spacetime events.

Arguments

  • events — Ordered sequence of market observations as SpacetimeEvents. Must be in chronological order (ascending time coordinate).

Returns

Vector of GeodesicSignal, one per input event:

  • events[0]: deviation = 0.0 (reference point), is_valid = true
  • events[i]: actual deviation from geodesic at step i

Returns an empty vector if events is empty. Returns a single {0.0, 0.0, true} if events has exactly one element.

Definition at line 82 of file geodesic_signal.cpp.


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