Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Namespaces
geodesic_path.cpp File Reference

Geodesic Portfolio Path implementation — Round 5. More...

#include "srfm/geodesic_path.hpp"
#include <algorithm>
#include <cmath>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Namespaces

namespace  srfm
 
namespace  srfm::portfolio
 

Detailed Description

Geodesic Portfolio Path implementation — Round 5.

See include/srfm/geodesic_path.hpp for the full module contract.

The geodesic equation d^2w_i/dt^2 = -2*lambda*w_i is a simple harmonic oscillator with omega = sqrt(2*lambda). The analytical solution is:

w_i(t) = A_i * cos(omega * t) + B_i * sin(omega * t)

Boundary conditions: w_i(0) = start.weights[i] → A_i = start.weights[i] w_i(1) = end.weights[i] → B_i = (end.weights[i] - A_i*cos(omega)) / sin(omega)

Degenerate cases:

Definition in file geodesic_path.cpp.