|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
#include <portfolio_manifold.hpp>
Public Member Functions | |
| const Eigen::MatrixXi & | adjacency_matrix () const noexcept |
| bool | has_edge (std::size_t i, std::size_t j) const noexcept |
| std::size_t | n_assets () const noexcept |
| Return the number of assets (graph nodes). | |
| int | out_degree (std::size_t i) const noexcept |
| Return the out-degree of node i (number of assets that i causally precedes). | |
| int | in_degree (std::size_t j) const noexcept |
| Return the in-degree of node j (number of assets that causally precede j). | |
| const std::vector< std::string > & | asset_ids () const noexcept |
| Return asset IDs in the order they were added. | |
Static Public Member Functions | |
| static std::optional< SpacetimeCausalGraph > | build (const MinkowskiCovariance &mc) noexcept |
Directed causal graph over a set of asset events.
An edge (i → j) is added when asset_i is TIMELIKE-separated from asset_j: ds²(i, j) < −LIGHTLIKE_THRESHOLD
Under the "causal influence hypothesis", a TIMELIKE edge means asset_i's price dynamics causally precede and may predict asset_j's dynamics.
The adjacency matrix A is an NxN boolean matrix (stored as Eigen::MatrixXi): A(i, j) = 1 iff ds²(i, j) < −LIGHTLIKE_THRESHOLD A(i, i) = 0 (no self-loops)
Definition at line 182 of file portfolio_manifold.hpp.
|
noexcept |
Return the NxN adjacency matrix. A(i,j) = 1 means edge (i→j) exists (asset_i TIMELIKE before asset_j).
Definition at line 178 of file portfolio_manifold.cpp.
|
noexcept |
Return asset IDs in the order they were added.
Definition at line 208 of file portfolio_manifold.cpp.
|
staticnoexcept |
Build the causal graph from a MinkowskiCovariance instance.
Requires at least 2 asset events. Returns nullopt if fewer are available.
| mc | MinkowskiCovariance with N >= 2 stored events. |
Definition at line 139 of file portfolio_manifold.cpp.
|
noexcept |
Return true iff an edge (i → j) exists.
| i | Source asset index (0-based). |
| j | Destination asset index (0-based). |
Definition at line 182 of file portfolio_manifold.cpp.
|
noexcept |
Return the in-degree of node j (number of assets that causally precede j).
Definition at line 201 of file portfolio_manifold.cpp.
|
noexcept |
Return the number of assets (graph nodes).
Definition at line 190 of file portfolio_manifold.cpp.
|
noexcept |
Return the out-degree of node i (number of assets that i causally precedes).
Definition at line 194 of file portfolio_manifold.cpp.