Agentic Trading Lab
Talk to agents, and test trading ideas. Try AI trading agents on real market data with no code required.
AI translation
Free retirement withdrawal calculator: test any withdrawal rate against every starting year since 1872. Success rate, safe maximum and worst case for your st…
FinancePythonGitHub @investwealth-comOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Annual US stock, bond and inflation data 1872–2025 and the script behind InvestWealth's retirement calculators
Taken from the repository README
Loading the full README.
Read the full README ↗Annual US data from 1872 to 2025 and a small Python script that reproduce the numbers on investwealth.com/tools/safe-withdrawal-rate and investwealth.com/tools/how-long-will-my-money-last:
Backtested results are hypothetical. Educational research, not investment advice.
data/us_annual_returns_1872.csv — one row per calendar year, 1872–2025:
| column | meaning |
|---|---|
us_stocks_total_return | US stocks (S&P 500 and its predecessors), total return, decimal (0.10 = +10%) |
us_10y_treasury_total_return | 10-year US Treasury, total return |
us_cpi_inflation | US consumer price inflation |
Sources: Robert Shiller's long-run stock, interest-rate and CPI series (Yale, "Irrational Exuberance" data) and FRED (Federal Reserve Bank of St. Louis); InvestWealth calculations for the annual total returns. Use the data freely with attribution to the original sources and to InvestWealth.com.
python scripts/retirement_test.py # 60/40, 4%, 30 years, plus the tables
python scripts/retirement_test.py --stocks 80 --rate 3.5 --years 40 --fee 0.2
No dependencies beyond the Python standard library. The method is the one the calculators use: stocks and 10-year Treasuries rebalanced once a year, the withdrawal raised with each year's actual inflation, one retirement starting in every year from 1872, before taxes, optional yearly cost in percent.
Sample output (defaults):
4.00% withdrawal, 60/40, 30 years, costs 0.00%: 124 of 125 retirement starts (1872–1996) survived
failures: 1966 (ran out in year 29)
highest rate that survived every start: 3.91%
Safe maximum withdrawal rate by mix and horizon (survived every start since 1872):
stocks/bonds 20y 30y 40y 50y
100/0 4.5% 3.9% 3.7% 3.6%
80/20 4.7% 4.0% 3.8% 3.6%
60/40 4.8% 3.9% 3.6% 3.5%
40/60 4.7% 3.8% 3.5% 3.1%
20/80 4.5% 3.4% 2.7% 2.3%
Code: MIT (see LICENSE). Data: derived from the public Shiller and FRED series, free to use with attribution.
InvestWealth.com · Dr.-Ing. Harry Hamann · Educational research, not investment advice. Past returns do not guarantee future results. Backtested results are hypothetical.