Analysis updated 2026-05-18
Backtest an investment strategy using decades of stock, bond, and currency return data.
Convert a raw return series into an inflation-adjusted real return series.
Plot cumulative returns of several asset classes on one chart for comparison.
Pull long-history interest rate and currency data into a research project without scraping it yourself.
| birjusuketupatel/returndatafiles | 1038lab/agnes-ai | 3eyedtiger/video2vrcemote | |
|---|---|---|---|
| Stars | 4 | 4 | 4 |
| Language | Python | Python | Python |
| Setup difficulty | easy | easy | easy |
| Complexity | 1/5 | 2/5 | 1/5 |
| Audience | researcher | vibe coder | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
No infrastructure needed, just install requirements.txt if you want to use the transform or plot scripts.
ReturnDataFiles is a collection of CSV files with historical financial data going back more than 50 years, covering stocks, bonds, currencies, and inflation. It is built by one person, Birju Patel, and is meant as a ready-to-use dataset rather than a piece of software you run. The files include annual returns for developed international stock markets outside the US, monthly returns and yields for 10-year government bonds and short-term interest rates across countries, daily currency exchange rates and their returns against the US dollar, and a monthly US inflation index. Many of the return figures are given as excess returns, meaning the return above what you would earn by borrowing money at a short-term interest rate. The README explains the exact calculation method for each file, including which years use which data sources, since older data before 2015 is estimated using weighted combinations of country data rather than direct index tracking. It also flags a known limitation: the bond return estimates are smoothed in a way that makes them unreliable for testing trading strategies based on price momentum, while the daily currency data does not have that problem. Alongside the data files, the project includes two small Python scripts. One, transform.py, lets you take any of the built-in return series and convert it into either a real (inflation-adjusted) or nominal total return series, either by running it interactively or by passing command line arguments. The other, plot.py, lets you interactively select multiple of the built-in series and view a chart of their cumulative returns using matplotlib. Both scripts require installing dependencies from a requirements file first. The README lists its original data sources, including the World Bank, the OECD, the Federal Reserve, the JST Macrohistory Database, and the Bureau of Labor Statistics, and points to the Ken French Data Library as a place to find related equity factor data. The dataset is released into the public domain and the author states it is provided for research and educational purposes only, not as investment advice, with no guarantee that the figures are accurate or complete.
A public-domain dataset of over 50 years of stock, bond, and currency return data, plus small Python scripts to transform and plot it.
Mainly Python. The stack also includes Python, pandas, matplotlib.
Public domain: use freely for any purpose, including commercial use, with no restrictions and no warranty of accuracy.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.