Turn trade logs into a living Excel portfolio workbook
Claude Code can read a broker export, pull market data, and assemble a formula-driven Excel portfolio file.
- What they did
- The user gave Claude Code the path to a trade export, plus the portfolio’s starting cash and launch date, and asked it to rely on spreadsheet formulas rather than fixed entries. Claude scanned the trades, used yfinance for prices and company details, and generated Python that assembled the workbook tabs. Afterward, the user checked that recalculations worked in Excel. Later prompts added broker imports, including Robinhood through robin_stocks, and a script for updating the file each day.
- How it went
- The workbook described in the guide included a main dashboard, holdings, an equity line, risk stats, and stress tests. It did not report any measured gains or losses. The process was not fully hands-off, because Claude could still hardcode values or misread instructions, which meant the user sometimes had to ask for corrections.
- Tips
- Keep the source export untouched and save the finished workbook under a new name. After the file is built, edit one quoted price and make sure the linked formulas respond. Claude Pro costs $20/month, and larger projects may run into usage limits on Max at $100.
Try it yourself with Claude Code
I have a broker export at [file path]. Use Python to read it and create a new Excel workbook called [filename].xlsx that tracks my portfolio with formulas rather than fixed numbers. Include current price data and company information from Yahoo Finance, and add sections for holdings, cost basis, current value, gain or loss, allocation, an equity curve, risk metrics, and stress tests. Use [starting capital] as the opening cash amount and [start date] as the first date in the history. Save the finished workbook as a separate file in this folder. Before you do anything that would connect to an account, submit information, send files, delete data, or make another irreversible change, pause and ask me to approve that step. When you’re done, explain how I can refresh the workbook and how to verify that the formulas update when a price changes.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Turn brokerage exports into a portfolio action plan
Use an agent to parse brokerage files, compare holdings to your goals, and draft buy, hold, and stop-buying lists with tax-loss harvesting alternatives.
Build one dashboard for investing, taxes, and credit checks
A developer used Claude Code to create a local finance system that organized account data, tax prep, and credit alerts.
Create a portfolio research workflow with live inputs
They used Claude Code to assemble a private investing assistant that mixes live data, macro signals, and news into one review.
Set up a private finance analyst in Claude Code
They used Claude Code with Baselight data to make a local assistant that reviews finances, tracks decisions, and keeps future actions on file.
Use Claude Code to sort back taxes from records
They used Claude Code to clean up overdue Dutch filings by pulling records, matching proof, and preparing tax totals.
Use Claude Code for twice-weekly stock research
Claude Code can track a portfolio, compare bullish and bearish views, and leave trade approval to a human.