|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
#include <geodesic_path.hpp>
Static Public Member Functions | |
| static Geodesic | solve (const PortfolioState &start, const PortfolioState &end, int n_steps, double lambda) |
Computes the geodesic between two portfolio states under a concentration penalty Lagrangian.
The analytical solution: omega = sqrt(2 * lambda) A_i = start.weights[i] B_i = (end.weights[i] - A_i * cos(omega)) / sin(omega) if sin(omega) != 0 (linear interpolation fallback when omega is near zero) w_i(t_norm) = A_i * cos(omega * t_norm) + B_i * sin(omega * t_norm)
where t_norm in [0, 1] is the normalised time along the geodesic.
Definition at line 99 of file geodesic_path.hpp.
|
static |
Solve for the geodesic between start and end.
| start | Initial portfolio state. |
| end | Target portfolio state. Must have the same dimension as start. |
| n_steps | Number of interior discretisation steps (>= 1). Total waypoints = n_steps + 1 (endpoints included). |
| lambda | Concentration penalty coefficient (>= 0). lambda = 0 → straight-line (flat spacetime) geodesic. |
| std::invalid_argument | if dimensions mismatch or n_steps < 1. |
Definition at line 77 of file geodesic_path.cpp.