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

Geodesic in multi-asset spacetime: the optimal portfolio path. More...

#include <multi_asset.hpp>

Classes

struct  GeodesicStep
 A single step on the geodesic path. More...
 

Static Public Member Functions

static std::vector< GeodesicStep > integrate (const MultiAssetEvent &initial, const Eigen::VectorXd &four_velocity, const Eigen::MatrixXd &metric, std::size_t n_steps, double dt) noexcept
 Compute the geodesic from an initial event with given four-velocity.
 
static std::vector< double > deviation_series (const std::vector< GeodesicStep > &predicted, const std::vector< MultiAssetEvent > &actual) noexcept
 Compute the geodesic deviation between the predicted and actual path.
 
static std::vector< Eigen::VectorXd > portfolio_weights (const std::vector< GeodesicStep > &steps, const Eigen::VectorXd &four_velocity, double gross_exposure=1.0) noexcept
 Compute portfolio weights along the geodesic path.
 

Detailed Description

Geodesic in multi-asset spacetime: the optimal portfolio path.

In the (N+1)-dimensional financial spacetime manifold, the geodesic equation describes the "force-free" trajectory of a portfolio in the absence of external shocks. Deviations of actual price paths from the geodesic are interpreted as trading signals.

The geodesic is computed via Euler integration of the linearised geodesic equation for the flat (constant-metric) case:

d²x^μ / dτ² = 0 (flat manifold: Christoffel symbols vanish)

Under a constant metric, the geodesic is simply a straight line in spacetime coordinates — the "inertial" portfolio trajectory. Curvature effects arise from the time-varying metric (handled by passing updated metrics per step).

Definition at line 261 of file multi_asset.hpp.

Member Function Documentation

◆ deviation_series()

std::vector< double > srfm::multi_asset::PortfolioGeodesic::deviation_series ( const std::vector< GeodesicStep > &  predicted,
const std::vector< MultiAssetEvent > &  actual 
)
staticnoexcept

Compute the geodesic deviation between the predicted and actual path.

Parameters
predictedGeodesic steps from integrate().
actualSequence of observed MultiAssetEvents.
Returns
Per-step deviation ||predicted_prices − actual_prices||₂, or empty if lengths mismatch.

Definition at line 357 of file multi_asset.cpp.

◆ integrate()

std::vector< PortfolioGeodesic::GeodesicStep > srfm::multi_asset::PortfolioGeodesic::integrate ( const MultiAssetEvent &  initial,
const Eigen::VectorXd &  four_velocity,
const Eigen::MatrixXd &  metric,
std::size_t  n_steps,
double  dt 
)
staticnoexcept

Compute the geodesic from an initial event with given four-velocity.

Parameters
initialStarting multi-asset event.
four_velocity(N+1)-vector dx^μ/dτ at the initial point.
metric(N+1)×(N+1) metric tensor (assumed constant).
n_stepsNumber of integration steps.
dtProper-time step size.
Returns
Sequence of GeodesicStep, or empty if inputs are invalid.

Definition at line 303 of file multi_asset.cpp.

◆ portfolio_weights()

std::vector< Eigen::VectorXd > srfm::multi_asset::PortfolioGeodesic::portfolio_weights ( const std::vector< GeodesicStep > &  steps,
const Eigen::VectorXd &  four_velocity,
double  gross_exposure = 1.0 
)
staticnoexcept

Compute portfolio weights along the geodesic path.

At each step the geodesic four-velocity is normalised so that the spatial components sum to the target gross exposure. Returns one weight vector per step.

Parameters
stepsGeodesic steps from integrate().
four_velocityReference four-velocity (direction of travel).
gross_exposureTarget portfolio gross exposure (sum of |weights|).
Returns
Per-step weight vectors.

Definition at line 383 of file multi_asset.cpp.


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