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

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
 

Detailed Description

Geodesic Portfolio Path — Round 5 public API.

Module: Geodesic Portfolio Path

Concept

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).

Analytical Solution

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.

Classes

Guarantees

Definition in file geodesic_path.hpp.