Overview
Use Cowork in Claude Desktop to write and run a small script that replays past market downturns against your own retirement savings and planned withdrawals, then review the scenario table yourself.
Problem or Objective
- Which agents clean, chart and explain a dataset you provide?
- Which agents help research stocks and markets?
More in Finance and Admin
AI Agents and Models
Tools and Integrations
- Tools
- Claude Desktop · Claude Cowork · pandas
- Prerequisites
- A paid Claude plan for Cowork in Claude Desktop, an export of your own holdings, and a historical returns and inflation table from a source you trust (not verified here).
How It Works
On a paid plan, open Cowork in Claude Desktop and connect one folder. Put two files in it: a spreadsheet export of your own retirement holdings by asset class, and a table of yearly historical returns and inflation for those asset classes from a data source you trust. Ask Claude to write a short Python script that starts a retirement in each year you name, for example the first year of several past bear markets, applies your planned yearly withdrawal adjusted for inflation, and records the balance each year. pandas is one way to build this, since it handles labelled tables of years and returns. Have the script save a spreadsheet with one row per scenario: the lowest balance, the year it occurred and whether the money lasted the full period. Check one scenario by hand against the return table, then change the withdrawal amount or the mix of assets and run it again to compare. Make no change to real accounts on the strength of this table alone.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Desktop.
- Connect the toolsConnect the tools this workflow relies on: Claude Desktop, Claude Cowork, pandas.
- Check the prerequisitesA paid Claude plan for Cowork in Claude Desktop, an export of your own holdings, and a historical returns and inflation table from a source you trust (not verified here).
- Gather your detailsCollect what the prompt asks for: Your holdings export, Historical returns table, Length of retirement in years, Start years to test, First-year withdrawal, Result spreadsheet.
- Run the starter promptPaste the starter prompt below into Claude Desktop and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at support.claude.com before you rely on it.
Practical Starter Prompt: Replay past downturns against my plan
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read [Your holdings export] (my holdings by asset class) and [Historical returns table] (yearly returns and inflation by asset class). Write a Python script that starts a retirement of [Length of retirement in years] years in each of these start years: [Start years to test]. Withdraw [First-year withdrawal] in the first year and raise it by inflation each year after. For each start year, record the yearly balance, the lowest balance and whether the money lasts. Save the results to [Result spreadsheet] and explain your assumptions in plain words. Do not give investment advice and do not connect to any account. Ask me before you save the output file.Run this in Cowork with only the folder holding the two files connected. Check one scenario by hand, read the stated assumptions, and treat the table as a starting point for a conversation with a licensed adviser, not as advice.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Claude help pages document Cowork on paid plans, running code in an isolated virtual machine with file access limited to connected folders. The pandas README describes it as a package for labelled data analysis. No cited page covers retirement modelling or the historical return data, so the accuracy of any scenario depends on your data and is untested here.
Limitations and Considerations
This is not financial advice: a replay of past markets says nothing certain about future returns, and taxes, fees and pension rules are left out unless you add them. Check the return data and one scenario by hand, and talk to a licensed adviser before changing withdrawals or investments. Keep account numbers and logins out of the files you share; holdings by asset class are enough. Cowork needs a paid plan; check the current plan page. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
Suggested Implementation Component
A repository that could serve as a building block. It is not part of the cited account and is not evidence that the workflow was run.
Sources
- Install Claude Desktop | Claude Help Center (opens in a new tab)
Project documentation · support.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Users on paid Claude plans can access Cowork in Claude Desktop.
- Cowork runs code in an isolated virtual machine on your computer.
- File reads and writes are limited to folders you connect, and network access follows your egress settings.
- Download Claude | Claude by Anthropic (opens in a new tab)
Project documentation · claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Code and Claude Cowork are available on Pro, Max, Ultra, Team, and Enterprise.
- pandas-dev/pandas README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 12:00 UTC
What this source supports
- pandas is a Python package that provides fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive.