|
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 | |
| MinkowskiCovariance (double c_market=constants::SPEED_OF_INFORMATION) noexcept | |
| void | add_asset (AssetEvent event) |
| std::size_t | size () const noexcept |
| Return the number of asset events currently stored. | |
| std::optional< Eigen::MatrixXd > | compute_spacetime_covariance () const noexcept |
| std::optional< double > | interval_correlation (std::size_t i, std::size_t j) const noexcept |
| std::optional< manifold::IntervalType > | classify_pair (std::size_t i, std::size_t j) const noexcept |
| const std::vector< AssetEvent > & | events () const noexcept |
| Read-only access to the stored asset events. | |
| void | clear () noexcept |
| Clear all stored events. | |
Accumulates a set of AssetEvents and computes an NxN covariance matrix whose (i,j) entry is derived from the spacetime interval between asset i and asset j.
For each ordered pair (i, j): ds²(i,j) = −c²·Δt² + ΔP² + ΔV² + ΔM² where Δx = event_j − event_i in each coordinate.
The covariance entry C(i,j) is defined as: C(i,j) = exp(−|ds²(i,j)|) (Gaussian kernel over interval)
This maps:
The diagonal is set to 1.0 (each asset is perfectly correlated with itself).
Definition at line 97 of file portfolio_manifold.hpp.
|
explicitnoexcept |
Construct with optional speed-of-information parameter.
| c_market | Speed-of-information constant (default: 1.0). |
Definition at line 43 of file portfolio_manifold.cpp.
| void srfm::portfolio::MinkowskiCovariance::add_asset | ( | AssetEvent | event | ) |
Add an asset event to the manifold.
Events are stored in insertion order. The i-th added event becomes row/column i of the output covariance matrix.
| event | Asset event to add. |
Definition at line 46 of file portfolio_manifold.cpp.
|
noexcept |
Classify the spacetime interval between asset pair (i, j).
| i | Index of first asset (0-based). |
| j | Index of second asset (0-based). |
Definition at line 89 of file portfolio_manifold.cpp.
|
noexcept |
Clear all stored events.
Definition at line 58 of file portfolio_manifold.cpp.
|
noexcept |
Compute the NxN Minkowski covariance matrix.
Requires at least 2 assets; returns nullopt if fewer are stored.
Definition at line 102 of file portfolio_manifold.cpp.
|
noexcept |
Read-only access to the stored asset events.
Definition at line 54 of file portfolio_manifold.cpp.
|
noexcept |
Compute the raw spacetime interval ds²(i, j) between asset pair (i, j).
| i | Index of first asset (0-based). |
| j | Index of second asset (0-based). |
Definition at line 80 of file portfolio_manifold.cpp.
|
noexcept |
Return the number of asset events currently stored.
Definition at line 50 of file portfolio_manifold.cpp.