|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
RK4 integrator for geodesics on an NAssetManifold. More...
#include <geodesic_n.hpp>
Public Member Functions | |
| GeodesicSolverN (const NAssetManifold &manifold, const ChristoffelN &christoffel) noexcept | |
| Construct from manifold and Christoffel symbol provider. | |
| std::optional< GeodesicState > | step (const GeodesicState &s, double dtau) const noexcept |
| Advance the geodesic by one RK4 step of proper-time dtau. | |
| std::optional< std::vector< GeodesicState > > | integrate (GeodesicState initial, double dtau, int n_steps) const noexcept |
| Integrate the geodesic for n_steps steps of size dtau. | |
| std::optional< double > | geodesic_deviation (const std::vector< GeodesicState > &traj) const noexcept |
| Measure the maximum deviation of a trajectory from a straight line. | |
| int | dim () const noexcept |
| Return the manifold dimension. | |
RK4 integrator for geodesics on an NAssetManifold.
Definition at line 57 of file geodesic_n.hpp.
|
noexcept |
Construct from manifold and Christoffel symbol provider.
Both objects must outlive this solver.
| manifold | The underlying NAssetManifold. |
| christoffel | Christoffel symbol computation object. |
Definition at line 28 of file geodesic_n.cpp.
|
inlinenoexcept |
Return the manifold dimension.
Definition at line 164 of file geodesic_n.hpp.
|
noexcept |
Measure the maximum deviation of a trajectory from a straight line.
Computes the straight line from traj.front() to traj.back() and returns the maximum Euclidean distance in the spatial (price) components from any intermediate point to the corresponding point on that line.
This provides a measure of how non-geodesic the trajectory is in flat space.
| traj | Trajectory of geodesic states. |
Definition at line 134 of file geodesic_n.cpp.
|
noexcept |
Integrate the geodesic for n_steps steps of size dtau.
Returns a vector of n_steps states (not including the initial state).
| initial | Starting state. |
| dtau | Proper-time step size. |
| n_steps | Number of steps to take. |
Definition at line 114 of file geodesic_n.cpp.
|
noexcept |
Advance the geodesic by one RK4 step of proper-time dtau.
Computes k1..k4 for both position and velocity, then combines: s_new = s + (dtau/6)(k1 + 2k2 + 2k3 + k4)
| s | Current state (position + velocity). |
| dtau | Proper-time step size (may be negative for backward integration). |
Definition at line 81 of file geodesic_n.cpp.