When should you use it?
- Your accounts are spread across types and nobody looks at the whole
- You want a plan to discuss with an advisor
- You can export holdings
Not for: Executing trades from it; Replacing professional advice for complex situations
What do you need, and what do you get?
You need
- Brokerage CSV exports
- Goals and constraints
- Target allocation ideas
You get
- Current versus target allocation grids
- Phased action list
- Estimated tax impact
How does it work, step by step?
- Load the exportsGive it every account's holdings with account type.
- State goalsDescribe horizon, risk and any constraints.
- Get a first planAsk for drift, placement issues and candidate swaps.
- Refine togetherCorrect assumptions and ask it to update every table.
- Ask for a self-critiqueHave it score the plan and list improvements, then verify.
The prompt
Our own prompt, inspired by Matt Stockton and written to work in Claude Code and Claude. Values in lime are placeholders.
Here are CSV exports of our brokerage and retirement accounts, plus our goals: [goals]. Build a summary of current allocation by asset class and account type, compare it with [target], and list issues such as overweights, tax placement and high-fee funds. Propose a phased plan with estimated one-time tax costs. Then rate your own plan from 1 to 10 and list what you would change. Do not recommend specific trades as instructions; present options.
Inspired by Matt Stockton: How I Built a Portfolio Optimization Plan with Claude Code. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Fund data such as fees and ratings can be stale; check before acting.
- Tax estimates are rough; confirm with a professional.
Our take
The self-critique prompt is the standout trick: asking for a score and changes surfaced an issue hiding in plain sight. Working over several sessions, like an analyst who returns, beats one-shot advice. Matt's process is a good template for anyone whose accounts are spread across several types and never looked at together. Give it every holding with its account type, state goals and constraints plainly, and expect to correct assumptions over a few sessions rather than accepting the first plan. The self-critique step deserves a place in any similar analysis; asking the agent to score its own plan and list what it would change is cheap and catches things you would otherwise miss. Treat fund details such as fees and ratings as possibly stale and check them before acting. Tax estimates are rough, so confirm them with a professional, especially for placement moves between account types. The output is a plan to discuss with an advisor or your partner, not a set of trades to execute.
Where the time goes back: Pulling several accounts into one analysis, usually an evening of spreadsheets, becomes a guided conversation.
FAQ
Why ask it to grade itself?
Is this financial advice?
Source and credit
Inspired by Matt Stockton. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- How I Built a Portfolio Optimization Plan with Claude Code
- Creator
- Matt Stockton
- Published on
- Matt Stockton
- Original date
- Feb 10, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.