57 int dim() const noexcept {
return static_cast<int>(
weights.size()); }
74 int size() const noexcept {
return static_cast<int>(states.size()); }
77 bool is_valid() const noexcept {
return states.size() >= 2; }
123 static double trajectory(
148 static double compute(
const Geodesic& geodesic,
double dt = 1.0)
noexcept;
151 static double distance(
std::vector< PortfolioState > states
Ordered from start to end.
int size() const noexcept
Number of waypoints (including endpoints).
const PortfolioState & end() const
Returns the end state (last waypoint).
const PortfolioState & start() const
Returns the start state (first waypoint).
bool is_valid() const noexcept
True if the path contains at least two states.
A point in portfolio space + time.
int64_t timestamp_ms
Wall-clock time in milliseconds.
std::vector< double > weights
Portfolio weights (any length >= 1)
bool is_valid() const noexcept
Returns true if weights is non-empty and all elements are finite.
int dim() const noexcept
Dimension of the portfolio (number of assets).
double sum_weights() const noexcept
Sum of all weights.