|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Geodesic Portfolio Path — Round 5 public API. More...
#include <cmath>#include <cstdint>#include <optional>#include <stdexcept>#include <vector>Go to the source code of this file.
Classes | |
| struct | srfm::portfolio::PortfolioState |
| A point in portfolio space + time. More... | |
| struct | srfm::portfolio::Geodesic |
| class | srfm::portfolio::GeodesicSolver |
| class | srfm::portfolio::GeodesicLength |
Namespaces | |
| namespace | srfm |
| namespace | srfm::portfolio |
Geodesic Portfolio Path — Round 5 public API.
In financial spacetime, the geodesic between two portfolio states is the path of minimum action. The Lagrangian is:
L = (1/2) ||dw/dt||^2 - V(w)
where V(w) = lambda * sum(w_i^2) is a concentration penalty.
The Euler-Lagrange equations yield:
d^2w_i/dt^2 = -dV/dw_i = -2 * lambda * w_i
This is simple harmonic oscillator motion with omega = sqrt(2 * lambda).
w_i(t) = A_i * cos(omega * t) + B_i * sin(omega * t)
Boundary conditions w_i(0) = start.weights[i] and w_i(T) = end.weights[i] determine A_i and B_i.
PortfolioState : weights vector + timestamp_msGeodesic : discretised path (vector of PortfolioState)GeodesicSolver : solves for the geodesic path between two statesGeodesicLength : computes the integrated arc length of a geodesicDefinition in file geodesic_path.hpp.