git404hub

what is returndatafiles fr?

birjusuketupatel/returndatafiles — explained in plain English

Analysis updated 2026-05-18

4PythonAudience · researcherComplexity · 1/5LicenseSetup · easy

tl;dr

A public-domain dataset of over 50 years of stock, bond, and currency return data, plus small Python scripts to transform and plot it.

vibe map

mindmap
  root((ReturnDataFiles))
    What it does
      Historical returns
      50 plus years
      CSV files
    Tech stack
      Python
      pandas
      matplotlib
    Use cases
      Backtesting
      Inflation adjustment
      Charting returns
    Audience
      Researchers
      Quant analysts

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Backtest an investment strategy using decades of stock, bond, and currency return data.

VIBE 2

Convert a raw return series into an inflation-adjusted real return series.

VIBE 3

Plot cumulative returns of several asset classes on one chart for comparison.

VIBE 4

Pull long-history interest rate and currency data into a research project without scraping it yourself.

what's the stack?

Pythonpandasmatplotlib

how it stacks up fr

birjusuketupatel/returndatafiles1038lab/agnes-ai3eyedtiger/video2vrcemote
Stars444
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity1/52/51/5
Audienceresearchervibe codervibe coder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

No infrastructure needed, just install requirements.txt if you want to use the transform or plot scripts.

Public domain: use freely for any purpose, including commercial use, with no restrictions and no warranty of accuracy.

in plain english

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.

prompts (copy fr)

prompt 1
Show me how to use transform.py to convert developed_ex_us.csv into a real total return series.
prompt 2
Write a Python script using pandas to load fx_daily.csv and plot the USD price return over time.
prompt 3
Explain the difference between hedged and unhedged excess returns as described in this dataset.
prompt 4
Help me combine sov_bonds.csv and US_CPI.csv to compute inflation-adjusted bond returns.

Frequently asked questions

what is returndatafiles fr?

A public-domain dataset of over 50 years of stock, bond, and currency return data, plus small Python scripts to transform and plot it.

What language is returndatafiles written in?

Mainly Python. The stack also includes Python, pandas, matplotlib.

What license does returndatafiles use?

Public domain: use freely for any purpose, including commercial use, with no restrictions and no warranty of accuracy.

How hard is returndatafiles to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is returndatafiles for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.