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::GeodesicLength Class Reference

#include <geodesic_path.hpp>

Static Public Member Functions

static double compute (const Geodesic &geodesic, double dt=1.0) noexcept
 
static double distance (const PortfolioState &a, const PortfolioState &b) noexcept
 Compute the Euclidean distance between two PortfolioState weight vectors.
 

Detailed Description

Computes the integrated arc length of a Geodesic.

Arc length = integral of ||dw/dt|| dt

Approximated numerically as sum of Euclidean distances between consecutive waypoints.

Definition at line 139 of file geodesic_path.hpp.

Member Function Documentation

◆ compute()

double srfm::portfolio::GeodesicLength::compute ( const Geodesic &  geodesic,
double  dt = 1.0 
)
staticnoexcept

Compute the arc length of a discretised geodesic.

Parameters
geodesicThe path to measure.
dtTime step between waypoints in the same units as timestamp_ms differences. If zero, defaults to 1.0.
Returns
Arc length (>= 0). Returns 0 for a path with < 2 states.

Definition at line 163 of file geodesic_path.cpp.

◆ distance()

double srfm::portfolio::GeodesicLength::distance ( const PortfolioState &  a,
const PortfolioState &  b 
)
staticnoexcept

Compute the Euclidean distance between two PortfolioState weight vectors.

Definition at line 149 of file geodesic_path.cpp.


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