← ClaudeAtlas

portfolio-and-risklisted

Turn signals into weights, and compute performance metrics that are actually correct. TRIGGER - portfolio weights, allocation, rebalancing, mean-variance, Black-Litterman, risk parity, HRP, HERC, NCO, efficient frontier, covariance shrinkage or denoising, PyPortfolioOpt, riskfolio, skfolio, cvxportfolio; or computing Sharpe, Sortino, Calmar, CAGR, annualized volatility, max drawdown, VaR, CVaR, beta, alpha, a tearsheet, quantstats, pyfolio, empyrical, ffn, or performance attribution. Load before quoting any performance number: popular libraries disagree on identical input, one silently discards the risk-free rate you pass it, and an absurdly negative Sharpe has one known cause. SKIP for whether the result survives multiple testing (backtest-validation).
howard-lynn-ye/fin-skills · ★ 1 · AI & Automation · score 77
Install: claude install-skill howard-lynn-ye/fin-skills
# Portfolio construction and risk analytics Two independent problems live here. §1 picks an optimizer. §2 is the one you cannot skip: **the same return series produces different Sharpe ratios in different libraries, and one popular function silently ignores an argument you passed it.** ## 1. Pick an optimizer | Task | Use | Not | |---|---|---| | Textbook mean-variance / Black-Litterman, small universe, prototype | **PyPortfolioOpt** | — | | Broadest risk-measure menu (26 convex: CVaR, CDaR, EVaR, RLVaR, OWA), robust worst-case, integer constraints | **Riskfolio-Lib** | PyPortfolioOpt — too few risk measures | | sklearn `Pipeline` / `GridSearchCV` / cross-validation over portfolio models; entropy pooling; vine copulas | **skfolio** | Riskfolio-Lib — no sklearn API | | Multi-period, **transaction-cost-aware** simulation of the trading *policy* | **cvxportfolio** — 🚨 **GPL-3.0** | PyPortfolioOpt — single-period only | | **HRP** | Riskfolio-Lib / skfolio / PyPortfolioOpt `HRPOpt` | 🚨 **mlfinlab — proprietary, delisted from PyPI** | | **HERC, NCO, Schur complementary** | Riskfolio-Lib or skfolio **only** | PyPortfolioOpt does not implement these | | **Marcenko–Pastur denoising / detoning** | Riskfolio-Lib `denoiseCov`, skfolio `Denoise`/`Detone` | 🚨 **PyPortfolioOpt has neither** — its `CovarianceShrinkage` is Ledoit-Wolf, a *different* estimator | | Deep-learning end-to-end allocation | deepdow — ⚠️ dormant since Jan 2024 | — | **Gotchas that bite immediately:** - 🚨 **`HR