Skip to content

Clarify daily return units and add GPU-vs-CPU composition comparison in mean_variance_basic#54

Open
jgoldberg-nvidia wants to merge 2 commits into
mainfrom
notebook-units-and-composition
Open

Clarify daily return units and add GPU-vs-CPU composition comparison in mean_variance_basic#54
jgoldberg-nvidia wants to merge 2 commits into
mainfrom
notebook-units-and-composition

Conversation

@jgoldberg-nvidia

Copy link
Copy Markdown
Collaborator

Addresses user questions about mean_variance_basic.ipynb (why "Expected Return: 0.2914%", and how to compare CPU vs GPU portfolios):

  • Units note + labels: all statistics come from 1-day LOG returns, so they are daily; adds an annualized block (0.29%/day ≈ 73% annualized log ≈ 108% annualized simple return, in-sample, not a forecast).
  • Composition comparison cell: direct cuOpt vs CVXPY-cuOpt vs CLARABEL weights side by side with per-weight diffs (max |Δw| = 5.9e-06 on re-execution) — complements the metrics-only compare_results.
  • Variable shadowing fix: CVXPY-API results renamed cvxpy_gpu_* so the direct cuOpt solve no longer overwrites them.
  • Notebook fully re-executed on GPU (cuOpt 26.06, fresh sp500 snapshot, 386 tickers); nbformat-valid; skill validation (tests/test_skill.py, ci/utils/validate_skills.sh) and full CPU suite pass.

🤖 Generated with Claude Code

jgoldberg-nvidia and others added 2 commits July 2, 2026 15:57
…_variance_basic

Answers recurring user questions about the notebook's "Expected Return: 0.2914%"
figure and how to compare solver results:

- Add a units note: all returns are 1-day LOG returns, so every reported
  statistic is daily, not annualized (0.29%/day ~ 73% annualized log return
  ~ 108% annualized simple return, in-sample).
- Label the portfolio statistics as daily and add an annualized block
  (x252 log return, exp conversion to simple, sqrt(252) volatility/Sharpe).
- Add a portfolio-composition comparison cell (direct cuOpt vs CVXPY-cuOpt vs
  CLARABEL side by side with per-weight diffs) alongside the existing
  compare_results metrics comparison.
- Rename the CVXPY-API solve results to cvxpy_gpu_* so the direct cuOpt solve
  no longer silently shadows them.
- Re-executed end-to-end on GPU (cuOpt 26.06): all solvers agree at 0.2914%/day
  expected return with max GPU-vs-CPU weight difference of 5.9e-06.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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