cufolio
Use when a user asks to build, optimize, backtest, rebalance, or analyze a stock portfolio with Mean-CVaR, efficient frontiers, scenario generation, or NVIDIA cuOpt.
Security Assessment
About cufolio
cuFOLIO is an instruction skill that drives NVIDIA's `cufolio` Python package to build and analyze quantitative stock portfolios using GPU-accelerated Mean-CVaR optimization. It solves the problem of constructing downside-risk-aware allocations from price data: computing returns, generating KDE scenarios, solving weight allocations with the cuOpt GPU solver via cvxpy, tracing efficient frontiers, backtesting against benchmarks, and running scheduled or drift-triggered rebalancing.
The skill acts as a guardrailed wrapper around the installed package rather than reimplementing math. It targets workflows such as building or optimizing a Mean-CVaR portfolio, producing a weights-by-risk-aversion table, plotting an efficient frontier, backtesting an allocation, and rebalancing on a schedule, across S&P 500, S&P 100, Dow 30, or user-supplied price datasets. It sets defaults (for example the CUOPT solver with PDLP method and CvarParameters), points to references/workflows/agent_recipes.md as the source of truth for exact API shapes, and enforces validation guardrails on user CSVs (a date-like index, numeric ticker columns, at least 60 rows). Notably, it treats the first-run download of public S&P 500 market data through the cufolio/yfinance helper as an action requiring the user's confirmation, and it forbids fabricating or substituting price data. It explicitly scopes out price forecasting, neural-network training, vehicle routing, and non-portfolio optimization.
The intended users are quantitative analysts, portfolio engineers, and researchers with an NVIDIA GPU runtime (cuOpt and cuML installed, a matching CUDA extra, and cvxpy exposing cp.CUOPT). Network access is needed only on first run to fetch the default price CSV.
FAQ
What does cuFOLIO do?
It builds and analyzes quantitative portfolios using GPU-accelerated Mean-CVaR optimization — computing returns, generating scenarios, solving allocations with the cuOpt solver, tracing efficient frontiers, backtesting, and rebalancing.
What are the prerequisites?
A Python environment with the installed cufolio package, an NVIDIA GPU runtime with cuOpt and cuML, a matching CUDA extra (such as cuda12 or cuda13), cvxpy exposing cp.CUOPT, and network access on first run if the default price CSV must be downloaded.
Where does the price data come from?
The default dataset is an S&P 500 CSV fetched through the cufolio/yfinance data helper. The skill treats the first-run download as an action requiring user confirmation and forbids fabricating or substituting price data.
What is out of scope?
It should not be used for generic finance summaries, price forecasting, neural-network training, vehicle routing, or non-portfolio optimization.
Does it reimplement portfolio math itself?
No. It drives the installed cufolio package APIs and explicitly instructs against reinstalling it, reimplementing workflows from scratch, or replacing package APIs with generic pandas/scipy/cvxpy code.
Install cufolio
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nvidia/skills