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::minkowski_momentum::FourMomentumConservation Class Reference

#include <minkowski_momentum.hpp>

Static Public Member Functions

static bool conserves (std::span< const FourMomentum > trades, const FourMomentum &reference, double tolerance=1e-9) noexcept
 
static FourMomentum sum (std::span< const FourMomentum > momenta) noexcept
 

Detailed Description

Checks whether a set of trade four-momenta conserves total four-momentum (i.e. the net change in portfolio exposure sums to the reference vector).

Definition at line 126 of file minkowski_momentum.hpp.

Member Function Documentation

◆ conserves()

bool srfm::minkowski_momentum::FourMomentumConservation::conserves ( std::span< const FourMomentum >  trades,
const FourMomentum &  reference,
double  tolerance = 1e-9 
)
staticnoexcept

Check four-momentum conservation for a collection of trades.

The trades are considered "conserving" if the sum of all four-momentum vectors equals the reference vector within tolerance.

Parameters
tradesSpan of four-momentum changes from individual trades.
referenceExpected net four-momentum (e.g. zeros for net-flat).
tolerancePer-component absolute tolerance (default 1e-9).
Returns
true if all four components are conserved.

Definition at line 87 of file minkowski_momentum.cpp.

◆ sum()

FourMomentum srfm::minkowski_momentum::FourMomentumConservation::sum ( std::span< const FourMomentum >  momenta)
staticnoexcept

Sum a collection of four-momenta into a single resultant.

Parameters
momentaSpan of four-momentum vectors.
Returns
Component-wise sum.

Definition at line 74 of file minkowski_momentum.cpp.


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