Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
srfm::portfolio::GeodesicSolver Class Reference

#include <geodesic_path.hpp>

Static Public Member Functions

static Geodesic solve (const PortfolioState &start, const PortfolioState &end, int n_steps, double lambda)
 

Detailed Description

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.

Member Function Documentation

◆ solve()

Geodesic srfm::portfolio::GeodesicSolver::solve ( const PortfolioState &  start,
const PortfolioState &  end,
int  n_steps,
double  lambda 
)
static

Solve for the geodesic between start and end.

Parameters
startInitial portfolio state.
endTarget portfolio state. Must have the same dimension as start.
n_stepsNumber of interior discretisation steps (>= 1). Total waypoints = n_steps + 1 (endpoints included).
lambdaConcentration penalty coefficient (>= 0). lambda = 0 → straight-line (flat spacetime) geodesic.
Returns
Geodesic with (n_steps + 1) waypoints.
Exceptions
std::invalid_argumentif dimensions mismatch or n_steps < 1.

Definition at line 77 of file geodesic_path.cpp.


The documentation for this class was generated from the following files: