尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Risk parity rebalancing and retirement drawdown planner. Static React app that runs in your browser: withdrawal sequencing, RMDs, spending guardrails, bootstrap Monte Carlo. Educational, not financial advice.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A React + Vite static site for risk parity portfolio rebalancing and retirement drawdown planning. It tells you what to trade to reach your target risk allocation tax-efficiently, and then how much you can spend from that portfolio once you stop earning.
Deploys free to GitHub Pages: https://paruff.github.io/risk-parity-compass/
Not financial advice. This is educational planning software. Every projection depends on assumptions you supply, and historical and simulated returns do not predict the future.
Accumulation / rebalancing
Drawdown / retirement
Portfolio library
npm ci # install
npm run dev # dev server on http://localhost:5173/risk-parity-compass/
npm run build # production build to dist/
npm run preview # preview the build on http://localhost:4173/risk-parity-compass/
State persists in localStorage under rpcompass_* keys (schemaVersion 2). Data saved under the old shannonsdemon_* keys (the project's former name) is migrated on first load and left in place as a backup; plan files exported under the old name still import.
Retirement tab — Safe/Perpetual Withdrawal Rate, Monte Carlo success probability, RMDs, guardrails (None, RPR-80) and a static-vs-guardrail comparison. Every metric block carries a planning-estimate disclaimer. Download PDF uses the browser print dialog with a print stylesheet (no sidebar, nav or dark theme).
Portfolios tab — curated templates you can load, compare and analyse. Template weights are validated, never adjusted to sum to 1.
Data resilience — every quote carries its snapshot date. If a ticker is missing from the snapshot the app says so and suggests close matches, and you can override a price by hand. The Retirement tab reports the effective history horizon and which ticker limits it.
Backup and accessibility — Export plan / Import plan (versioned, validated JSON, includes scenarios); a reminder appears when a backup is over 30 days old or storage is nearly full. Text size (100/115/130%) and high contrast persist.
Prices are a bundled snapshot, not a live feed. npm run prices:update (scripts/update-prices.mjs) fetches daily (2 years) and monthly (full history) adjusted closes from Yahoo Finance's unofficial chart endpoint server-side, one polite request at a time, and writes one JSON file per ticker to public/prices/ plus an index.json. The site reads those files from its own origin, so browsers never call Yahoo (it sends no CORS header and cannot be called from GitHub Pages). The deploy workflow refreshes the snapshot best-effort on weekday evenings; if Yahoo rate-limits the runner, the committed files are used. Yahoo is the only data source (the project has no API key for a fallback provider), so a blocked refresh means stale prices, not a different source; there is no live or intraday pricing. Only tickers in the snapshot can be analysed (about 50 common ETFs: the defaults, every template holding and the common-ETF list). Tests never call Yahoo: unit tests use MSW and E2E uses Playwright route interception on the snapshot files.
Static datasets are also bundled and need no network: the IRS RMD table and the 1928–2025 long-run returns (see below).
Rolling SWR/PWR/success and the Monte Carlo use bundled annual returns for 1928–2025 (src/utils/long-run-returns.json):
Everything you enter stays in your browser's localStorage; there is no server, account or analytics. The page makes no requests to third parties: prices are static files served from the same site, so not even the tickers you look up leave your browser. See SECURITY.md.
| Gate | Command | Budget |
|---|---|---|
| Unit / integration | npm test | must pass |
| End-to-end | npm run test:e2e | must pass |
| Lint | npm run lint | 0 errors |
| Format | npm run format | Prettier clean |
| Build | npm run build | must succeed |
| Lighthouse | CI | perf ≥ 0.9, a11y ≥ 0.95, best practices ≥ 0.9, SEO ≥ 0.9 |
Pre-commit runs Lefthook + lint-staged on staged files. CI runs every gate plus the build on each push and pull request. A human reviews and merges; agents never merge.
Environment note: this repository's tooling requires
env -u NODE_OPTIONS <command>for Node subprocesses, because a brokenNODE_OPTIONSshim in the development environment breaks vitest, Playwright, hooks and Lighthouse.
| Document | Purpose |
|---|---|
DESIGN.md | Design tokens, component rules and UI do's/don'ts (designmd.app / Google design.md format) |
docs/intent.md · docs/spec.md · docs/plan.md | Why, contracts, and milestones mapped to GitHub issues |
REVIEW.md | How to review a change here |
AGENTS.md | Repository context and conventions for AI agents |
docs/superpowers/specs/2026-10-25-retirement-production-roadmap-design.md | Long-form roadmap spec (history) |
docs/superpowers/plans/ | Implementation plans, one per milestone |
docs/superpowers/reviews/ | Code review records |
Known Limitations.md | Known constraints and open risks |
Source of truth: docs/plan.md, which maps each milestone to its GitHub issue and PR.
| Milestone | Scope | State |
|---|---|---|
| M1–M3.5 | Withdrawal engine, tax and account mechanics, guardrails, correctness remediation | shipped |
| M4 | Portfolio templates, diversification view, comparison | shipped |
| M5 | Storage v2, print/PDF, accessibility preferences | shipped |
| M6 | Learning journey: competency rubric, engine-graded modules, spaced refresher | shipped |
| M7 (#37) | Expert review remediation: guardrail cap (#29), honest historical metrics (#30), template fidelity (#31), long-run history (#32), bootstrap Monte Carlo (#33), equal-risk-contribution weights (#34), tax-aware drawdown (#35), code hygiene (#36) | shipped |
Headline historical metrics now rest on proxy history for most portfolios; read Known Limitations.md for what the proxies cannot represent.
Began in 2025 as a Streamlit tool called Shannon's Demon, was rewritten as a React + Vite SPA in 2026, and renamed Risk Parity Compass when it grew a retirement drawdown engine. "Shannon's Demon" now names only the rebalancing effect the app uses. See docs/intent.md for provenance.
MIT — see LICENSE.