|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
(N+1)-dimensional Lorentzian manifold for N financial assets. More...
#include <n_asset_manifold.hpp>
Public Member Functions | |
| NAssetManifold (int n_assets, Eigen::MatrixXd covariance, double c_market=1.0) noexcept | |
| Construct an NAssetManifold directly. | |
| int | dim () const noexcept |
| Returns the full manifold dimension = n_assets + 1. | |
| int | n_assets () const noexcept |
| Returns the number of asset (spatial) dimensions. | |
| std::optional< Eigen::MatrixXd > | metric_at (const Eigen::VectorXd &x) const noexcept |
| Evaluate the metric tensor at point x. | |
| std::optional< Eigen::MatrixXd > | inverse_metric_at (const Eigen::VectorXd &x) const noexcept |
| Evaluate the inverse metric g^μν at point x. | |
| std::optional< double > | line_element_sq (const Eigen::VectorXd &x, const Eigen::VectorXd &dx) const noexcept |
| Compute the squared line element ds² = g_μν dx^μ dx^ν. | |
| bool | is_flat () const noexcept |
| Returns true if the metric has no coordinate dependence. | |
| std::optional< Eigen::MatrixXd > | covariance () const noexcept |
| Returns the covariance matrix used to build the metric. | |
| bool | reduces_to_4d (const NAssetManifold &other) const noexcept |
| Check structural compatibility with a 4D (N=3) manifold. | |
| double | c_market () const noexcept |
| Return the market speed-of-light parameter. | |
| const Eigen::MatrixXd & | metric () const noexcept |
| Direct metric accessor (no coordinate argument). | |
| const Eigen::MatrixXd & | inverse_metric () const noexcept |
| Direct inverse metric accessor. | |
Static Public Member Functions | |
| static std::optional< NAssetManifold > | make (int n, Eigen::MatrixXd cov, double c_market=1.0) noexcept |
| Factory: validate inputs then construct. | |
(N+1)-dimensional Lorentzian manifold for N financial assets.
The manifold dimension is n_assets + 1 (one time axis plus N price axes). The metric is assembled from a user-supplied N×N positive-definite covariance matrix and a market speed-of-light parameter c_market.
Definition at line 48 of file n_asset_manifold.hpp.
|
noexcept |
Construct an NAssetManifold directly.
Prefer the factory make() which validates inputs and returns std::nullopt on failure instead of constructing an invalid object.
| n_assets | Number of asset price dimensions (spatial dimensions). |
| covariance | N×N positive-definite covariance matrix Σ. |
| c_market | Market speed-of-light parameter (must be > 0). |
Definition at line 17 of file n_asset_manifold.cpp.
|
inlinenoexcept |
Return the market speed-of-light parameter.
Definition at line 239 of file n_asset_manifold.hpp.
|
noexcept |
Returns the covariance matrix used to build the metric.
Definition at line 141 of file n_asset_manifold.cpp.
|
inlinenoexcept |
Returns the full manifold dimension = n_assets + 1.
Definition at line 226 of file n_asset_manifold.hpp.
|
inlinenoexcept |
Direct inverse metric accessor.
Returns the pre-built inverse metric matrix.
Definition at line 247 of file n_asset_manifold.hpp.
|
noexcept |
Evaluate the inverse metric g^μν at point x.
Computed via LU decomposition of the metric matrix.
| x | Coordinate vector of length dim(). |
Definition at line 117 of file n_asset_manifold.cpp.
|
inlinenoexcept |
Returns true if the metric has no coordinate dependence.
For NAssetManifold the metric is always constant, so this always returns true.
Definition at line 234 of file n_asset_manifold.hpp.
|
noexcept |
Compute the squared line element ds² = g_μν dx^μ dx^ν.
| x | Base point (unused for flat manifold, validated for dimension). |
| dx | Displacement vector of length dim(). |
Definition at line 130 of file n_asset_manifold.cpp.
|
staticnoexcept |
Factory: validate inputs then construct.
Validates:
| n | Number of assets. |
| cov | N×N covariance matrix. |
| c_market | Market speed of light (default 1.0). |
Definition at line 32 of file n_asset_manifold.cpp.
|
inlinenoexcept |
Direct metric accessor (no coordinate argument).
Returns the pre-built constant metric matrix.
Definition at line 243 of file n_asset_manifold.hpp.
|
noexcept |
Evaluate the metric tensor at point x.
Because this is a constant (flat) manifold the result does not depend on x. The parameter is accepted for API uniformity with curved manifolds.
Returns a (N+1)×(N+1) matrix: row/col 0 → time component (g_00 = -c_market²) rows/cols 1..N → spatial block (g_ij = Σ_ij)
| x | Coordinate vector of length dim() (unused for flat manifolds). |
Definition at line 108 of file n_asset_manifold.cpp.
|
inlinenoexcept |
Returns the number of asset (spatial) dimensions.
Definition at line 230 of file n_asset_manifold.hpp.
|
noexcept |
Check structural compatibility with a 4D (N=3) manifold.
Returns true if other has n_assets == 3 and this manifold's spatial block is consistent with being an extension of a 4D manifold. Concretely: returns true when other.n_assets() == 3 and this->n_assets() >= 3.
| other | Manifold to compare against. |
Definition at line 145 of file n_asset_manifold.cpp.