Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Namespaces
relativistic_optimizer.cpp File Reference

Implementation of RelativisticPortfolio optimizer. More...

#include "relativistic_optimizer.hpp"
#include "srfm/constants.hpp"
#include <Eigen/Dense>
#include <algorithm>
#include <cmath>
#include <numeric>

Go to the source code of this file.

Namespaces

namespace  srfm
 
namespace  srfm::portfolio
 

Detailed Description

Implementation of RelativisticPortfolio optimizer.

See include/relativistic_optimizer.hpp for the public API contract.

Algorithm

The optimization problem is: minimise risk_tolerance · w^T Σ_st w subject to w^T μ_rel ≥ r_target Σ_i w_i = 1, w_i ≥ 0

Solved via projected gradient descent: w_{k+1} = Π_simplex(w_k − α · ∇_w L(w_k)) where L(w) = risk_tolerance · w^T Σ_st w − λ · (w^T μ_rel − r_target) ∇_w L(w) = 2 · risk_tolerance · Σ_st · w − λ · μ_rel

λ is adaptively set so the return constraint is enforced at each step.

Definition in file relativistic_optimizer.cpp.