PortfolioRiskEngine
Three allocation approaches — maximum Sharpe, minimum variance and hierarchical risk parity — run side by side over the same universe, with a full risk diagnostic on every rebalance. The point is not to find a single optimal portfolio; it is to see how much the answer moves when the method changes.
iThe problem
Mean-variance optimisation is notoriously sensitive: small changes in expected returns produce wildly different allocations, and the result is frequently concentrated in a handful of names.
A single 'optimal' portfolio presented without context invites false confidence.
Risk is multi-dimensional, but most allocations are judged on return alone.
iiThe approach
Run several allocation methods in parallel rather than committing to one, and treat their disagreement as the informative signal.
Hierarchical risk parity as a stabiliser: it clusters assets by correlation before allocating, which avoids the instability that invert-a-covariance-matrix approaches suffer from.
Diagnostics on every rebalance: value at risk, maximum drawdown, Sortino ratio, correlation structure and beta to the benchmark.
Constraints and estimates are parameters, not hardcoded values, so assumptions can be varied deliberately and their effect observed.
iiiWhat it produces
Allocation is chosen with visibility into how method-dependent each recommendation actually is.
Risk is reported alongside return, so a concentrated position is visible as a choice rather than a surprise.
Rebalancing surfaces correlation shifts — the early signal that diversification has quietly degraded.
Stack