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

#include <tensor.hpp>

Public Member Functions

 MetricTensor (MetricFunction metric_fn)
 Construct from an arbitrary position-dependent metric function.
 
MetricMatrix evaluate (const SpacetimePoint &x) const
 
void evaluate_into (const SpacetimePoint &x, MetricMatrix &out) const
 
std::optional< MetricMatrix > inverse (const SpacetimePoint &x) const
 
bool is_lorentzian (const SpacetimePoint &x) const
 
double spacetime_interval (const SpacetimePoint &x, const FourVelocity &dx) const
 

Static Public Member Functions

static MetricTensor make_minkowski (double time_scale=1.0, double spatial_scale=1.0)
 
static MetricTensor make_diagonal (double time_scale, const std::array< double, 3 > &vol)
 
static MetricTensor make_from_covariance (double time_scale, const Eigen::Matrix3d &cov)
 

Detailed Description

A position-dependent 4×4 symmetric tensor g_μν encoding the geometry of the financial spacetime manifold.

The metric signature is (−,+,+,+): component 0 is timelike (market time), components 1–3 are spacelike (asset returns). Off-diagonal spatial entries encode asset correlations; off-diagonal time-space entries encode temporal momentum correlations.

Example

// Flat market: uncorrelated assets, equal volatility 0.2
srfm::SpacetimePoint origin = srfm::SpacetimePoint::Zero();
auto gx = g.evaluate(origin); // diag(-1, 0.04, 0.04, 0.04)
static MetricTensor make_minkowski(double time_scale=1.0, double spatial_scale=1.0)
Eigen::Vector< double, SPACETIME_DIM > SpacetimePoint
Definition types.hpp:41

Definition at line 167 of file tensor.hpp.

Constructor & Destructor Documentation

◆ MetricTensor()

srfm::tensor::MetricTensor::MetricTensor ( MetricFunction  metric_fn)
explicit

Construct from an arbitrary position-dependent metric function.

Definition at line 23 of file metric_tensor.cpp.

Member Function Documentation

◆ evaluate()

MetricMatrix srfm::tensor::MetricTensor::evaluate ( const SpacetimePoint &  x) const

Evaluate g_μν at the given spacetime point.

Arguments

  • x — Position in the 4D financial spacetime manifold

Returns

The 4×4 metric matrix at x.

Definition at line 28 of file metric_tensor.cpp.

◆ evaluate_into()

void srfm::tensor::MetricTensor::evaluate_into ( const SpacetimePoint &  x,
MetricMatrix &  out 
) const
inline

Evaluate g_μν at x and store the result into out (in-place overload).

Avoids an extra copy compared to evaluate() when the caller already holds a MetricMatrix to overwrite.

Arguments

  • x — Position in the 4D financial spacetime manifold
  • out — Output matrix to overwrite with g_μν(x)

Definition at line 189 of file tensor.hpp.

◆ inverse()

std::optional< MetricMatrix > srfm::tensor::MetricTensor::inverse ( const SpacetimePoint &  x) const

Compute the inverse metric g^μν at point x.

Returns

  • Some(g_inv) if the metric is invertible at x
  • None if the metric is singular (degenerate correlations)

Definition at line 32 of file metric_tensor.cpp.

◆ is_lorentzian()

bool srfm::tensor::MetricTensor::is_lorentzian ( const SpacetimePoint &  x) const

Return true if the metric has Lorentzian signature (−,+,+,+) at x. A Lorentzian metric has exactly one negative eigenvalue.

Definition at line 75 of file metric_tensor.cpp.

◆ make_diagonal()

MetricTensor srfm::tensor::MetricTensor::make_diagonal ( double  time_scale,
const std::array< double, 3 > &  vol 
)
static

Diagonal metric from per-asset volatilities: g = diag(−time_scale², σ₁², σ₂², σ₃²).

Arguments

  • time_scale — Scale of the time dimension
  • vol — Array of three asset volatilities {σ₁, σ₂, σ₃}

Definition at line 120 of file metric_tensor.cpp.

◆ make_from_covariance()

MetricTensor srfm::tensor::MetricTensor::make_from_covariance ( double  time_scale,
const Eigen::Matrix3d &  cov 
)
static

Full covariance-based metric from a 3×3 asset covariance matrix. g = block-diag(−time_scale², Σ) where Σ is the asset covariance.

Arguments

  • time_scale — Scale of the time dimension
  • cov — 3×3 asset covariance matrix (must be positive definite)

Definition at line 132 of file metric_tensor.cpp.

◆ make_minkowski()

MetricTensor srfm::tensor::MetricTensor::make_minkowski ( double  time_scale = 1.0,
double  spatial_scale = 1.0 
)
static

Flat Minkowski-like metric: g = diag(−time_scale², σ², σ², σ²).

Equivalent to a market with uncorrelated assets of equal volatility σ.

Arguments

  • time_scale — Scale of the time dimension (c analogue), default 1
  • spatial_scale — Common asset volatility σ, default 1

Definition at line 108 of file metric_tensor.cpp.

◆ spacetime_interval()

double srfm::tensor::MetricTensor::spacetime_interval ( const SpacetimePoint &  x,
const FourVelocity &  dx 
) const

Compute the spacetime interval ds² = g_μν dx^μ dx^ν.

Returns

  • Negative: timelike displacement (subluminal market movement)
  • Zero: null / lightlike (signal at speed of information)
  • Positive: spacelike displacement (acausal — outside light cone)

Definition at line 99 of file metric_tensor.cpp.


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