|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
#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) |
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.
Definition at line 167 of file tensor.hpp.
|
explicit |
Construct from an arbitrary position-dependent metric function.
Definition at line 23 of file metric_tensor.cpp.
| MetricMatrix srfm::tensor::MetricTensor::evaluate | ( | const SpacetimePoint & | x | ) | const |
Evaluate g_μν at the given spacetime point.
x — Position in the 4D financial spacetime manifoldThe 4×4 metric matrix at x.
Definition at line 28 of file metric_tensor.cpp.
|
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.
x — Position in the 4D financial spacetime manifoldout — Output matrix to overwrite with g_μν(x) Definition at line 189 of file tensor.hpp.
| std::optional< MetricMatrix > srfm::tensor::MetricTensor::inverse | ( | const SpacetimePoint & | x | ) | const |
Compute the inverse metric g^μν at point x.
Some(g_inv) if the metric is invertible at xNone if the metric is singular (degenerate correlations) Definition at line 32 of file metric_tensor.cpp.
| 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.
|
static |
Diagonal metric from per-asset volatilities: g = diag(−time_scale², σ₁², σ₂², σ₃²).
time_scale — Scale of the time dimensionvol — Array of three asset volatilities {σ₁, σ₂, σ₃} Definition at line 120 of file metric_tensor.cpp.
|
static |
Full covariance-based metric from a 3×3 asset covariance matrix. g = block-diag(−time_scale², Σ) where Σ is the asset covariance.
time_scale — Scale of the time dimensioncov — 3×3 asset covariance matrix (must be positive definite) Definition at line 132 of file metric_tensor.cpp.
|
static |
Flat Minkowski-like metric: g = diag(−time_scale², σ², σ², σ²).
Equivalent to a market with uncorrelated assets of equal volatility σ.
time_scale — Scale of the time dimension (c analogue), default 1spatial_scale — Common asset volatility σ, default 1 Definition at line 108 of file metric_tensor.cpp.
| double srfm::tensor::MetricTensor::spacetime_interval | ( | const SpacetimePoint & | x, |
| const FourVelocity & | dx | ||
| ) | const |
Compute the spacetime interval ds² = g_μν dx^μ dx^ν.
Definition at line 99 of file metric_tensor.cpp.