skfolio/skfolio ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library for portfolio optimization and risk management that feels like scikit learn, so I can fit, tune, cross validate, and stress test portfolio models in a consistent way.

I want it to support common portfolio approaches like equal weight, inverse volatility, mean risk, risk budgeting, hierarchical risk parity, and some ensemble style methods, plus estimators for expected returns, covariance, variance, distances, priors, and uncertainty sets. It should also include a few useful preprocessing tools for assets, like filtering out bad or missing series, dropping highly correlated names, and scaling or winsorizing data.

Please include clear examples, documentation, and tests, and make sure the library is easy to use with pandas data and can produce portfolio weights and basic performance and risk outputs. If you need to check current scikit learn or cvxpy docs while implementing, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab