|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Classes | |
| class | CachedChristoffelSymbols |
| class | CachedMetricTensor |
| class | ChristoffelN |
| Computes Christoffel symbols Γ^λ_μν for an NAssetManifold. More... | |
| class | ChristoffelSymbols |
| class | ChristoffelSymbolsDual |
| struct | DualNumber |
| class | GeodesicDeviationCalculator |
| struct | GeodesicSignal |
| class | GeodesicSolver |
| class | GeodesicSolverN |
| RK4 integrator for geodesics on an NAssetManifold. More... | |
| struct | GeodesicState |
| Position and 4-velocity state on the manifold. More... | |
| class | MetricTensor |
| class | NAssetManifold |
| (N+1)-dimensional Lorentzian manifold for N financial assets. More... | |
Typedefs | |
| using | DualSpacetimePoint = Eigen::Matrix< DualNumber, SPACETIME_DIM, 1 > |
| using | DualMetricMatrix = Eigen::Matrix< DualNumber, SPACETIME_DIM, SPACETIME_DIM > |
| A 4×4 matrix of dual numbers — the metric evaluated at a dual-number point. | |
| using | DualMetricFunction = std::function< DualMetricMatrix(const DualSpacetimePoint &)> |
| using | MetricFunction = std::function< MetricMatrix(const SpacetimePoint &)> |
| using | ChristoffelArray = std::array< MetricMatrix, SPACETIME_DIM > |
Functions | |
| std::vector< std::vector< GeodesicState > > | integrate_batch (const GeodesicSolver &solver, const std::vector< std::pair< SpacetimePoint, FourVelocity > > &initial_conditions, int steps) |
Variables | |
| static constexpr double | TIKHONOV_LAMBDA = 1e-10 |
| static constexpr double | TIKHONOV_CONDITION = 1e-10 |
| Relative pivot threshold below which inverse() regularizes the metric. | |
| using srfm::tensor::ChristoffelArray = typedef std::array<MetricMatrix, SPACETIME_DIM> |
Christoffel symbols as an array of 4×4 matrices. Access pattern: gamma[lambda](mu, nu) = Γ^λ_μν.
Definition at line 148 of file tensor.hpp.
| using srfm::tensor::DualMetricFunction = typedef std::function<DualMetricMatrix(const DualSpacetimePoint&)> |
A callable mapping a dual-number spacetime point to a dual-number metric. Implement this alongside MetricFunction to enable exact autodiff derivatives.
Definition at line 138 of file tensor.hpp.
| using srfm::tensor::DualMetricMatrix = typedef Eigen::Matrix<DualNumber, SPACETIME_DIM, SPACETIME_DIM> |
A 4×4 matrix of dual numbers — the metric evaluated at a dual-number point.
Definition at line 134 of file tensor.hpp.
| using srfm::tensor::DualSpacetimePoint = typedef Eigen::Matrix<DualNumber, SPACETIME_DIM, 1> |
A 4-vector of dual numbers — one per spacetime coordinate. Used to seed the autodiff direction when computing metric derivatives.
Definition at line 131 of file tensor.hpp.
| using srfm::tensor::MetricFunction = typedef std::function<MetricMatrix(const SpacetimePoint&)> |
A callable that maps a spacetime point to the metric matrix at that point. Used for position-dependent (curved) metrics.
Definition at line 144 of file tensor.hpp.
|
inline |
Integrate a batch of geodesics in parallel using std::execution::par_unseq.
Each geodesic is independent (different initial conditions), so the per-geodesic integrations can be run concurrently without any shared mutable state. The solver object itself is read-only; each lambda call operates on its own trajectory vector.
This provides a straightforward way to amortise the overhead of multiple-asset geodesic integration — one call per portfolio rebalance instead of a sequential for-loop.
The C++ standard library parallel STL backend must be available.
solver — Configured GeodesicSolver (read-only).initial_conditions — Vector of (initial_position, initial_velocity) pairs.steps — Number of RK4 steps per trajectory.Vector of trajectories (one per initial condition), each containing steps + 1 GeodesicState entries in proper-time order.
The GeodesicSolver and MetricTensor are accessed as const; parallel calls are safe provided the MetricFunction stored in the solver's MetricTensor is itself thread-safe for concurrent const calls.
Definition at line 629 of file tensor.hpp.
|
staticconstexpr |
Relative pivot threshold below which inverse() regularizes the metric.
Definition at line 19 of file metric_tensor.cpp.
|
staticconstexpr |
Definition at line 17 of file metric_tensor.cpp.