118 [[nodiscard]] std::size_t
n_assets()
const noexcept;
128 [[nodiscard]] std::optional<Eigen::VectorXd>
137 [[nodiscard]] std::optional<Eigen::MatrixXd>
150 [[nodiscard]] std::optional<OptimizationResult>
152 double risk_tolerance = 1.0)
const noexcept;
155 void clear()
noexcept;
159 [[nodiscard]]
double compute_beta(
const AssetEvent& e)
const noexcept;
162 [[nodiscard]]
static double gamma_factor(
double beta)
noexcept;
167 [[nodiscard]]
static Eigen::VectorXd
168 project_simplex(
const Eigen::VectorXd& v)
noexcept;
172 [[nodiscard]]
static Eigen::VectorXd
173 geodesic_gradient(
const Eigen::MatrixXd& sigma_st,
174 const Eigen::VectorXd& w)
noexcept;
176 std::vector<AssetEvent> events_;
177 std::vector<double> expected_returns_;
std::size_t n_assets() const noexcept
Return the number of assets currently in the portfolio.
std::optional< Eigen::MatrixXd > spacetime_covariance() const noexcept
std::optional< Eigen::VectorXd > relativistic_returns() const noexcept
void add_asset(AssetEvent event, double expected_return)
void clear() noexcept
Remove all assets from the portfolio.
std::optional< OptimizationResult > optimize_weights(double target_return, double risk_tolerance=1.0) const noexcept
static constexpr double SPEED_OF_INFORMATION
N-Asset Minkowski Covariance Matrix and Spacetime Causal Graph.
Result of a single portfolio optimization run.
int iterations
Number of gradient descent iterations.
Eigen::VectorXd weights
Optimal asset weights (sum to 1, >= 0)
double expected_return
w^T μ_rel (relativistic expected return)
double geodesic_risk
Achieved geodesic risk d_geo²
bool converged
True iff convergence_tol was reached.
Tuning parameters for the relativistic portfolio optimizer.
double step_size
Step size for gradient descent (learning rate).
double c_market
Speed-of-information parameter for Lorentz factor computation.
int max_iterations
Maximum number of projected gradient descent iterations.
double convergence_tol
Convergence tolerance: stop when ||w_{k+1} − w_k||₂ < tol.