Skip to content

feat(quantlib): add Hierarchical Risk Parity (HRP) portfolio allocation - #1196

Open
santhreal wants to merge 1 commit into
HKUDS:mainfrom
santhreal:feat/quantlib-hrp-portfolio
Open

feat(quantlib): add Hierarchical Risk Parity (HRP) portfolio allocation#1196
santhreal wants to merge 1 commit into
HKUDS:mainfrom
santhreal:feat/quantlib-hrp-portfolio

Conversation

@santhreal

Copy link
Copy Markdown
Contributor

Summary

Implements Hierarchical Risk Parity (HRP - López de Prado 2016) and inverse-variance weighting for robust portfolio allocation without covariance matrix inversion.

Changes

  • Added agent/src/quantlib/portfolio.py with hierarchical_risk_parity, inverse_variance_weights, correlation_distance, quasi_diagonalize, and cluster_variance.
  • Exposed functions via QuantlibCallTool in agent/src/tools/quantlib_tool.py.
  • Added unit and property tests in agent/tests/quantlib/test_portfolio.py verifying distance metrics, weight normalization, and allocation properties.

Signed-off-by: santhreal 64453045+santhreal@users.noreply.github.com

@santhreal
santhreal force-pushed the feat/quantlib-hrp-portfolio branch from 855561f to e9f9d98 Compare August 24, 2026 10:23
Implement Hierarchical Risk Parity (López de Prado 2016) with tree clustering,
quasi-diagonalization, inverse-variance allocation, and cluster variance calculation.

Signed-off-by: santhreal <64453045+santhreal@users.noreply.github.com>
@santhreal
santhreal force-pushed the feat/quantlib-hrp-portfolio branch from e9f9d98 to ef540ad Compare August 24, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant