---
license: cc-by-4.0
language:
- en
pretty_name: CalcFi Open Data
size_categories:
- 100K<n<1M
task_categories:
- tabular-regression
- time-series-forecasting
tags:
- finance
- economics
- household-finance
- macro
- time-series
- open-data
- public-domain
- fred
- bls
- world-bank
- mortgage
- inflation
- employment
- forex
- crypto
- commodities
configs:
- config_name: default
  data_files:
  - split: train
    path: datasets/*/data.csv
source_datasets:
- original
multilinguality:
- monolingual
---

# calcfi-open-data

[![Figshare DOI](https://img.shields.io/badge/Figshare%20DOI-10.6084%2Fm9.figshare.32332290-blue)](https://doi.org/10.6084/m9.figshare.32332290)
[![Zenodo DOI](https://img.shields.io/badge/Zenodo%20DOI-10.5281%2Fzenodo.20302283-1682D4)](https://doi.org/10.5281/zenodo.20302283)
[![OSF DOI](https://img.shields.io/badge/OSF%20DOI-10.17605%2FOSF.IO%2FPUMKT-2C6BAC)](https://doi.org/10.17605/OSF.IO/PUMKT)
[![Kaggle DOI](https://img.shields.io/badge/Kaggle%20DOI-10.34740%2Fkaggle%2Fdsv%2F16356447-20BEFF)](https://doi.org/10.34740/kaggle/dsv/16356447)
[![Mendeley DOI](https://img.shields.io/badge/Mendeley%20DOI-10.17632%2Fjsnwhy6vjn.1-A91111)](https://doi.org/10.17632/jsnwhy6vjn.1)
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey)](https://creativecommons.org/licenses/by/4.0/)

**Source mirrors:** [Hugging Face](https://huggingface.co/datasets/iizy/calcfi-open-data) · [GitHub](https://github.com/jerehere/calcfi-open-data) · [GitLab](https://gitlab.com/jere.salmisto/calcfi-open-data) · [GitLab Pages](https://calcfi-open-data-4a2bc1.gitlab.io/)

**Query surfaces:** [Datasette (live SQL)](https://calcfi-open-data.vercel.app/) · [data.world](https://data.world/jerehere/calcfi-open-data) · [DoltHub (git-for-data)](https://www.dolthub.com/repositories/jerehere/calcfi-open-data) · [MotherDuck (cloud DuckDB)](https://app.motherduck.com/share/92e4b6ab-46e0-42f4-8ebb-9e7ab22eae00)

**Package mirrors:** [PyPI](https://pypi.org/project/calcfidata/) · [Anaconda.org](https://anaconda.org/jeresalmisto/calcfidata) · [GitLab Package Registry](https://gitlab.com/jere.salmisto/calcfi-open-data/-/packages/60607126)

**Docs:** [Read the Docs](https://calcfidata.readthedocs.io/) · [Methodology paper](https://calcfi-open-data-4a2bc1.gitlab.io/methodology.html)

Free, daily-refreshed financial and macro datasets — every series cited to a primary source, every CSV under CC BY 4.0.

> **Live source + JSON API:** https://calcfi.app/developers
> **Per-series HTML pages with charts:** https://calcfi.app/data
> **OpenAPI 3.1 spec:** https://calcfi.app/api/insights/openapi.json

This repo mirrors the read-only data exposed by [CalcFi](https://calcfi.app) so it can be consumed as a Frictionless Data Package, mirrored to dataset registries, and version-controlled with full git history.

## What's in here

34 series across 11 categories, each in its own subdir under [`datasets/`](datasets/):

| Category | Series |
|---|---|
| Mortgage rates | 30-year-fixed, 15-year-fixed, 10-year-treasury |
| Interest rates | federal-funds-rate, prime-rate, 2-year-treasury |
| Inflation | cpi, pce |
| Employment | unemployment-rate, labor-force-participation, avg-hourly-earnings |
| Energy | crude-oil-wti, crude-oil-brent, us-regular-gas-price |
| FX | usd-eur, usd-gbp, usd-jpy |
| Crypto | bitcoin, ethereum, solana |
| Deposit rates | savings-national-rate, money-market-national-rate, cd-3mo, cd-12mo, cd-60mo |
| Credit | credit-card-apr, auto-loan-rate-48mo, personal-loan-rate-24mo |
| Commodities | copper-price, corn-price |
| Global (World Bank) | us-gdp-per-capita, world-inflation, world-unemployment, eurozone-gdp-per-capita |

Every subdir contains:

- `data.csv` — full history (date, value, unit), provenance headers preserved
- `datapackage.json` — [Frictionless Data Package](https://frictionlessdata.io/) descriptor, DataHub-compatible
- `README.md` — series-specific source, license, citation, and CalcFi live URL

## Quick start

```bash
# Full mortgage rate history
curl https://raw.githubusercontent.com/jerehere/calcfi-open-data/main/datasets/30-year-fixed/data.csv

# CPI history
curl https://raw.githubusercontent.com/jerehere/calcfi-open-data/main/datasets/cpi/data.csv

# Latest single value (live API, daily-refreshed)
curl https://calcfi.app/api/rates/30-year-fixed
```

```python
import pandas as pd
url = "https://raw.githubusercontent.com/jerehere/calcfi-open-data/main/datasets/30-year-fixed/data.csv"
df = pd.read_csv(url, comment="#", parse_dates=["date"])
print(df.tail())
```

```r
library(readr)
df <- read_csv("https://raw.githubusercontent.com/jerehere/calcfi-open-data/main/datasets/30-year-fixed/data.csv",
               comment = "#")
```

## Primary sources

All values pass through verbatim from these official sources. No transformations or imputations are applied.

- [**FRED**](https://fred.stlouisfed.org/) — Federal Reserve Economic Data (St. Louis Fed)
- [**Freddie Mac PMMS**](https://www.freddiemac.com/pmms) — Primary Mortgage Market Survey
- [**BLS**](https://www.bls.gov/) — Bureau of Labor Statistics (CPI, employment, wages)
- [**BEA**](https://www.bea.gov/) — Bureau of Economic Analysis (PCE)
- [**US Treasury**](https://home.treasury.gov/) — Treasury yields
- [**FDIC**](https://www.fdic.gov/resources/bankers/national-rates/) — National Rates and Rate Caps
- [**EIA**](https://www.eia.gov/) — Energy Information Administration (oil, gas)
- [**Federal Reserve H.10**](https://www.federalreserve.gov/releases/h10/) — Foreign exchange rates
- [**CoinGecko**](https://www.coingecko.com/) — Cryptocurrency spot prices
- [**World Bank Open Data**](https://data.worldbank.org/) — GDP, world inflation, world unemployment
- [**IMF Commodity Data**](https://www.imf.org/external/np/res/commod/index.aspx) — Copper, corn (via FRED)

## Refresh cadence

A GitHub Actions workflow ([`.github/workflows/refresh.yml`](.github/workflows/refresh.yml)) runs daily at 06:00 UTC, pulls the latest history from CalcFi's read-only API, and commits any changes. Most series update at their natural cadence:

- Daily: Treasury yields, FX, oil, crypto, fed funds
- Weekly: 30Y / 15Y mortgage, gas price
- Monthly: CPI, PCE, unemployment, hourly earnings, commodities
- Quarterly: credit card APR, personal loan
- Annual: World Bank series

## License

This repository's structure, scripts, and README are released under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). The data itself in `datasets/*/data.csv` is licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) — attribution requested.

**How to attribute:**

> Data via [CalcFi](https://calcfi.app), sourced from [primary source]. CC BY 4.0.

Primary source terms also apply where data is mirrored from FRED, BLS, World Bank, etc. — consult the per-dataset `README.md` for the canonical source link.

## Why this exists

Most personal-finance and macro data APIs are paid, rate-limited behind a credit card, or wrap a single primary source you could hit yourself. [CalcFi](https://calcfi.app) is a free personal-finance calculator platform that consumes these primary sources for its tools; this repo exposes the same data as a clean, version-controlled, Frictionless-compliant dataset bundle so it can be mirrored to DataHub, Hugging Face, Kaggle, and Zenodo.

## Mirroring this to other registries

This repo is structured so each subdir under `datasets/` is a complete Frictionless Data Package. To publish on DataHub.io, point at this repo and set "Root Dir" to e.g. `datasets/30-year-fixed`. Repeat per dataset.

For Hugging Face Datasets, Kaggle, Zenodo, or re3data — see [`docs/mirroring.md`](docs/mirroring.md) (TBD; PRs welcome).

## Contributing

This is a mirror, not the source of truth. To propose data changes, request a new series, or correct a primary-source citation, open an issue or PR. For live calculator + API issues, see https://calcfi.app/about.

## Citation

> Salmisto, J. (2026). CalcFi Open Data: 34 Free CC-BY Financial and Macro Time Series Mirrored from Primary Sources [Dataset]. Figshare. https://doi.org/10.6084/m9.figshare.32332290
