Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file include/srfm/types.hpp
4/// @brief Shared primitive types for the Special Relativity in Financial
5/// Modeling (SRFM) system.
6///
7/// All agent modules include this file. It defines the core value types and
8/// Eigen-based linear-algebra aliases used throughout the system.
9///
10/// This file is READ-ONLY for all agents except the one designated to
11/// maintain shared types. Submit a `CROSS_AGENT_REQUESTS.md` entry to
12/// propose changes.
13
14#include <Eigen/Dense>
15#include <optional>
16#include <array>
17
18namespace srfm {
19
20/// Dimensionality of the financial spacetime manifold (1 time + 3 assets).
21static constexpr int SPACETIME_DIM = 4;
22
23// ─── Strong Scalar Types ──────────────────────────────────────────────────────
24
25/// Market velocity as a fraction of the speed of information propagation.
26/// Analogous to β = v/c in special relativity.
27/// Valid range: (-BETA_MAX_SAFE, BETA_MAX_SAFE).
29 double value;
30};
31
32/// Lorentz factor γ = 1/√(1−β²). Always ≥ 1.0 for valid beta.
34 double value;
35};
36
37// ─── Linear Algebra Aliases ───────────────────────────────────────────────────
38
39/// A point in the 4-dimensional financial spacetime manifold.
40/// Component layout: [t, x¹, x², x³] = [time, asset₁, asset₂, asset₃].
41using SpacetimePoint = Eigen::Vector<double, SPACETIME_DIM>;
42
43/// A tangent vector at a spacetime point (four-velocity: dx^μ/dτ).
44using FourVelocity = Eigen::Vector<double, SPACETIME_DIM>;
45
46/// The covariant metric tensor g_μν: a 4×4 symmetric matrix.
47using MetricMatrix = Eigen::Matrix<double, SPACETIME_DIM, SPACETIME_DIM>;
48
49// ─── Signal Type ──────────────────────────────────────────────────────────────
50
51/// A financial signal with relativistic corrections applied.
53 double raw_value; ///< Original signal before correction
54 LorentzFactor gamma; ///< Lorentz factor used
55 double adjusted_value; ///< γ · m_eff · raw_value
56 std::optional<double> time; ///< Proper time stamp (caller-set)
57};
58
59} // namespace srfm
Eigen::Vector< double, SPACETIME_DIM > FourVelocity
A tangent vector at a spacetime point (four-velocity: dx^μ/dτ).
Definition types.hpp:44
Eigen::Matrix< double, SPACETIME_DIM, SPACETIME_DIM > MetricMatrix
The covariant metric tensor g_μν: a 4×4 symmetric matrix.
Definition types.hpp:47
Eigen::Vector< double, SPACETIME_DIM > SpacetimePoint
Definition types.hpp:41
static constexpr int SPACETIME_DIM
Dimensionality of the financial spacetime manifold (1 time + 3 assets).
Definition types.hpp:21
Lorentz factor γ = 1/√(1−β²). Always ≥ 1.0 for valid beta.
Definition types.hpp:33
A financial signal with relativistic corrections applied.
Definition types.hpp:52
double adjusted_value
γ · m_eff · raw_value
Definition types.hpp:55
LorentzFactor gamma
Lorentz factor used.
Definition types.hpp:54
double raw_value
Original signal before correction.
Definition types.hpp:53
std::optional< double > time
Proper time stamp (caller-set)
Definition types.hpp:56