Build a portfolio plan from brokerage exports
February 10, 2026 · 10 min read. Task: February 10, 2026 · 10 min read I saw the below tweet recently and I did exactly this. Over multiple sessions with Claude Code, I fed it our brokerage CSVs, described our goals and constraints, and worked with it to produce a portfolio optimization plan - phased actions, tax impact analysis, fund recommendations, before-and-after allocation grids. The kind of plan you’d pay a financial advisor to put together, except I built it with an AI. A year ago, I wrote about building a personal finance tool in a day with AI. That project required software development - I used AI to help me build an application with a UI, data pipelines, and visualization components. Models have gotten flexible enough that you don’t need to build an app anymore. An agent like Claude Code can read your files, write scripts, run them, and iterate on the output directly. Setting Up the Workspace I used Claude Code, which runs in a terminal and can read and write files on your machine. I pointed it at a directory with all my financial data. Portfolio analysis is a good fit for this because there’s a lot of messy data in different formats that the model can just dig through directly. I started with three inputs: CSV exports from my various financial accounts - holdings, amounts, cost basis, fund fees, fund ratings, and a ton of other data the model could use A supplementary text file - there was other information I knew the model would need but no good way to export it, so I typed up a scratchpad with a bulleted list of things like bank balances, 529s, employer retirement account details, and automated investment settings. Not structured, but it had the raw numbers. A goal prompt describing what I wanted The goal prompt was the most important piece. I spent a lot of time on it and wrote it mostly by hand before having the AI review it - I wanted to force myself to think through all of our constraints and goals. I included: What data exists and where - a narrative of what files are in the directory and what the model should be considering The desired output format - I brainstormed the kinds of things I wanted to see: allocation tables, style-box grids, holdings charts, different ways to slice the data. And ultimately, a concrete plan for how to modify the portfolio to get to a target allocation. Our preferences - I want the portfolio to be tax efficient, I’d rather find the lowest fee ETFs that are good than chase performance, and I don’t want to overcomplicate things. I’m well-versed in this stuff but complexity isn’t the goal. Known constraints - everyone has their own nuances. For us, we’d decided not to touch the allocations or ongoing contributions for a specific account, so I called that out as a constraint. What we suspected was wrong - I had a view on things that could be better, so I included it, but I caveated it with “if you have a different view, I want to hear it.” I didn’t want to oversteer the model toward a specific outcome. If you have insight that can nudge it in the right direction, it’s worth providing - just make sure you give it room to look outside your ideas too. Strawman proposals - I included our own rough ideas for target allocations and investment changes. Even if they’re wrong, it gives the model a starting point to react to rather than building from scratch. “Ask me questions exhaustively” - I put this at the end of the prompt. It gets the AI to ask clarifying questions before jumping straight to conclusions, which makes the first plan way better. I also built up a CLAUDE.md file - project instructions that Claude reads at the start of every session. I had Claude set it up initially after asking me some questions, but after a couple sessions I started having Claude update it with any learnings from each session. Over time it became the project’s memory - data quirks, strategy decisions, target allocations. When I came back days later, Claude picked up right where we left off. Parsing the Mess; tools: Claude Code. Human role: The original post does not say how a person stayed involved.; limitations: Success depends on accurate, complete data exports and a well-structured goal prompt defining constraints and preferences. The agent may miss nuanced personal financial context without explicit clarification, requiring human review for tax implications and suitability. Integration requires local file access and terminal execution capabilities, with costs associated with multiple iterative sessions..
Tools
Published on Agent Work Atlas:
Overview
February 10, 2026 · 10 min read
Workflow
February 10, 2026 · 10 min read I saw the below tweet recently and I did exactly this. Over multiple sessions with Claude Code, I fed it our brokerage CSVs, described our goals and constraints, and worked with it to produce a portfolio optimization plan - phased actions, tax impact analysis, fund recommendations, before-and-after allocation grids. The kind of plan you’d pay a financial advisor to put together, except I built it with an AI. A year ago, I wrote about building a personal finance tool in a day with AI. That project required software development - I used AI to help me build an application with a UI, data pipelines, and visualization components. Models have gotten flexible enough that you don’t need to build an app anymore. An agent like Claude Code can read your files, write scripts, run them, and iterate on the output directly. Setting Up the Workspace I used Claude Code, which runs in a terminal and can read and write files on your machine. I pointed it at a directory with all my financial data. Portfolio analysis is a good fit for this because there’s a lot of messy data in different formats that the model can just dig through directly. I started with three inputs: CSV exports from my various financial accounts - holdings, amounts, cost basis, fund fees, fund ratings, and a ton of other data the model could use A supplementary text file - there was other information I knew the model would need but no good way to export it, so I typed up a scratchpad with a bulleted list of things like bank balances, 529s, employer retirement account details, and automated investment settings. Not structured, but it had the raw numbers. A goal prompt describing what I wanted The goal prompt was the most important piece. I spent a lot of time on it and wrote it mostly by hand before having the AI review it - I wanted to force myself to think through all of our constraints and goals. I included: What data exists and where - a narrative of what files are in the directory and what the model should be considering The desired output format - I brainstormed the kinds of things I wanted to see: allocation tables, style-box grids, holdings charts, different ways to slice the data. And ultimately, a concrete plan for how to modify the portfolio to get to a target allocation. Our preferences - I want the portfolio to be tax efficient, I’d rather find the lowest fee ETFs that are good than chase performance, and I don’t want to overcomplicate things. I’m well-versed in this stuff but complexity isn’t the goal. Known constraints - everyone has their own nuances. For us, we’d decided not to touch the allocations or ongoing contributions for a specific account, so I called that out as a constraint. What we suspected was wrong - I had a view on things that could be better, so I included it, but I caveated it with “if you have a different view, I want to hear it.” I didn’t want to oversteer the model toward a specific outcome. If you have insight that can nudge it in the right direction, it’s worth providing - just make sure you give it room to look outside your ideas too. Strawman proposals - I included our own rough ideas for target allocations and investment changes. Even if they’re wrong, it gives the model a starting point to react to rather than building from scratch. “Ask me questions exhaustively” - I put this at the end of the prompt. It gets the AI to ask clarifying questions before jumping straight to conclusions, which makes the first plan way better. I also built up a CLAUDE.md file - project instructions that Claude reads at the start of every session. I had Claude set it up initially after asking me some questions, but after a couple sessions I started having Claude update it with any learnings from each session. Over time it became the project’s memory - data quirks, strategy decisions, target allocations. When I came back days later, Claude picked up right where we left off. Parsing the Mess
Reported result
The workflow produced a comprehensive ten-section plan document with gap analysis, tax location matrices, and sequenced action steps. The user reported actively executing the plan, noting it replaced weeks of spreadsheet work or thousands of dollars in advisor fees. Specific outcomes included identifying tax-free account overweights and optimizing retirement contribution structures, though no quantitative performance metrics were provided.
Human role
The original post does not say how a person stayed involved.
Limitations
Success depends on accurate, complete data exports and a well-structured goal prompt defining constraints and preferences. The agent may miss nuanced personal financial context without explicit clarification, requiring human review for tax implications and suitability. Integration requires local file access and terminal execution capabilities, with costs associated with multiple iterative sessions.
Try it
Act as a financial portfolio analyst using Claude Code. I will provide [replaceable inputs: brokerage CSV files, a text file with other account balances, and a goal prompt]. First, analyze the data to create a baseline portfolio snapshot. Then, generate a phased optimization plan including tax impact analysis and fund recommendations. Iterate with me by asking clarifying questions about constraints and preferences. Finally, produce a ten-section markdown document with appendices. Before finalizing, run a self-critique to identify potential errors. Do not execute any trades; only provide the plan for my review.
Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.