KMueller-Lab/Global-Macro-Database
حول
This repository includes replication code and raw data used in the construction of the Global Macro Database.
البيانات والتحليلاتما يمكنك فعله
- Coverage: Combines 167 sources, from international organizations such as the IMF, World Bank, and OECD to historical datasets.
- Variables: National accounts, consumption, investment, trade, prices, government finances, interest rates, employment, and financial crises.
- Source prioritization: Country-specific sources take priority over international aggregators, for both historical depth and accuracy.
- Harmonized data: All data is cleaned, spliced, and chainlinked for consistent cross-country comparison.
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- +٢
- خلال 15 يومًا
- +٣
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلThe Global Macro Database
Commercial users: see the World Economic Database from our partners at Anansi Data Analytics.
This repository complements our paper, Müller, Xu, Lehbib, and Chen (2025), which introduces a panel dataset of 46 core macroeconomic variables (provided as 77 harmonized series) across 239 countries from historical records beginning in the year 1086 until 2025, including projections through the year 2031.
Features
- Coverage: Combines 167 sources, from international organizations such as the IMF, World Bank, and OECD to historical datasets.
- Variables: National accounts, consumption, investment, trade, prices, government finances, interest rates, employment, and financial crises.
- Source prioritization: Country-specific sources take priority over international aggregators, for both historical depth and accuracy.
- Harmonized data: All data is cleaned, spliced, and chainlinked for consistent cross-country comparison.
- Metadata: Variable definitions follow SNA 2008 and are documented in the technical appendix.
- Quarterly releases: Each release has a version number and release notes.
- Access: Download from the website, or load the data with the Python, R, Stata, MATLAB, or Julia packages.
Data Access
Download the latest release in CSV, Stata, or Excel format from the website.
Stata package:
ssc install gmd
gmd rGDP, country(FRA)
Python package:
pip install global_macro_data
from global_macro_data import gmd
df = gmd(version="2026_09", country=["USA", "CHN"], variables=["rGDP", "CPI"])
R package:
install.packages("devtools")
devtools::install_github("KMueller-Lab/Global-Macro-Database-R")
library(globalmacrodata)
df <- gmd(version = "2026_09", country = c("USA", "CHN"), variables = c("rGDP", "CPI"))
MATLAB and Julia: see the MATLAB and Julia packages.
What this repository holds
data/helpers/versions.csvlists every release. The packages read it to check for new versions.data/helpers/release_notes/holds the notes for each release.code/,data/(apart fromdata/helpers/),output/anddocs/are from the first release (2025_01). They are kept as a replication archive and are not updated. Later releases are built with a separate pipeline that is not public.
Report data errors and package problems as issues.
Releases
We release a new version every quarter. The release schedule and the notes for all past releases are on the releases page and under GitHub Releases.
Version 2026_09 – Current
Overview
The 2026_09 release focuses on data quality and coverage. It corrects hundreds of errors in exchange rates, currency units, and government deficits, and adds seven sources, including historical estimates that take nominal GDP for Spain, Italy, and Portugal back to 1277, 1310, and 1527.
New Sources
This release adds seven sources, bringing the total to 167.
- Prados de la Escosura, Álvarez-Nogal and Santiago-Caballero: annual estimates for preindustrial Spain, 1277–1850, published by the Fundación Rafael del Pino. Spanish nominal GDP now begins in 1277 instead of 1827. The database keeps its existing real GDP and population for Spain.
- Malanima: GDP for central and northern Italy, 1310–1913. Italian nominal GDP now begins in 1310 instead of 1861, real GDP in 1310 instead of 1803, and the consumer price index in 1310 instead of 1549, with no gap between 1592 and 1799.
- Palma and Reis: a reconstruction of Portuguese economic growth, 1527–1850. It takes real GDP back from 1801 to 1527, nominal GDP from 1827 to 1527, and population from 1800 to 1527; the database already had population for 1600 and 1700. Consumer prices now begin in 1527 instead of 1549, and the gaps in the series up to 1671 are filled.
- Sultan Nazrin Shah: expenditure-based national accounts for Malaya, 1900–1939, published by the Economic History of Malaysia project. They are the database's first estimates of nominal GDP, household and government consumption, fixed investment, and inflation for Malaysia before the Second World War. They also replace the earlier real GDP for these years and add exports and imports for 1900–1911, which the trade sources did not cover.
- Catão and Solomou: trade-weighted real effective exchange rates for sixteen countries, 1870–1913. For Argentina, Brazil, Chile, China, India, Japan, Mexico, and the United States, these are the first real effective exchange rates before the First World War. For Greece they add 1870–1876; for the other seven countries the database keeps its existing series.
- Bank of Canada and Bank of England: sovereign default data for 174 countries, 1960–2024, from the BoC–BoE Sovereign Default Database. They add 101 sovereign debt crises in 64 countries. Three existing crises move one or two years earlier: Ghana from 1966 to 1965, Peru from 1969 to 1968, and India from 1969 to 1967.
- Asian Development Bank: an archived version of the Key Indicators Database, which keeps series that the current version no longer provides.
Updated Sources
- Laeven and Valencia: banking crisis dates now come from the latest edition of the systemic banking crises database. It extends coverage from 2017 to 2025 and adds thirteen crises.
Use with AI agents
The Global Macro Database can now be used directly from AI agents through the Anansi MCP server, which works with any client that supports the Model Context Protocol. For coding agents such as Claude Code and Codex, the open-source Anansi Data plugin sets up the connection. After signing in with an Anansi account, an agent can search the series, retrieve observations with their sources, compare and rank countries, and analyse and plot the data.
Package updates
The Python, R, and Stata packages have been updated.
New packages: MATLAB and Julia
New packages load the GMD directly in MATLAB and Julia.
Acknowledgements
We thank everyone who reported errors and suggested improvements.
Citation
Please cite the dataset as:
@techreport{GMD2025,
title = {The Global Macro Database: A New International Macroeconomic Dataset},
author = {M{\"u}ller, Karsten and Xu, Chenzi and Lehbib, Mohamed and Chen, Ziliang},
institution = {National Bureau of Economic Research},
type = {Working Paper},
series = {Working Paper Series},
number = {33714},
year = {2025},
month = {April},
doi = {10.3386/w33714},
URL = {http://www.nber.org/papers/w33714},
}
Acknowledgments
The development of the Global Macro Database would not have been possible without the generous funding provided by the Singapore Ministry of Education (MOE) through the PYP grants (WBS A-0003319-01-00 and A-0003319-02-00), a Tier 1 grant (A-8001749- 00-00), and the NUS Risk Management Institute (A-8002360-00-00). This financial support laid the foundation for the successful completion of this extensive project.
License
The Global Macro Database (GMD) is released under the GMD Research Use Terms (Version 1.1), our own license for public-good data. It follows the spirit of CC BY-NC-SA 4.0. Where the two differ, the Research Use Terms govern. The full terms are in LICENSE and at globalmacrodata.com/license.html.
The short version (a plain-English summary; the full Research Use Terms are what actually govern):
- Free for academic use. Students, faculty, and researchers at universities and academic research institutes, for research meant for publication, teaching, and theses.
- Also free for teachers (for the classroom) and non-profit organizations such as charities, foundations, and NGOs (for their non-commercial work).
- Everyone else, including companies, needs our written permission.
- Not for products. Do not build any part of it, even in derived form, into a product, service, model, index, or paid report.
- Cite it. Always credit the GMD and its authors (see Citation above).
- Do not re-host or rebadge it. Do not republish the data on another website, API, platform, product, or under another name without explicit, written approval; point people to globalmacrodata.com so they get the latest data and cite it. You may include the specific data used in a paper in that paper's replication package, clearly labeled as coming from the GMD.
- Share alike. If we allow you to build on it and share, keep these same terms.
- As-is. No warranty for correctness; we do our best to provide accurate data.
Unsure whether your use is non-commercial? Email [email protected].
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…