Millennium of UK Macro Data
Get the headline annual series of “A millennium of macroeconomic data for the UK”, the Bank of England’s research dataset of British economic history (Thomas and Dimsdale, version 3.1): around eighty series of output, population, employment, prices, wages, interest rates, asset prices, exchange rates, money, credit and public finances, from as early as 1086 (GDP and population), 1209 (consumer prices), 1694 (Bank Rate) and 1700 (share prices) to 2016. It is the longest consistent record of interest rates, inflation and asset prices of any economy, for calibrating the very long-run behaviour of scenario generators.
The series keep the names of the dataset, such as “Bank Rate”, “Consols / long-term government bond yields”, “Corporate bond yields”, “Share prices”, “Consumer price index”, “Consumer price inflation”, “House price index” and “$/£ exchange rate”; a second column of a series, such as its growth rate or its share of GDP, carries that unit in brackets. Rates, growth rates and shares of GDP are decimal fractions (0.05 for 5%); levels, indices and exchange rates are returned as published.
The dataset is not updated anymore. No API key is needed; the workbook is large (around 28 MB), so it is cached for a year.
See definition: https://www.bankofengland.co.uk/statistics/research-datasets
Also known as: three centuries of macroeconomic data, BoE millennium dataset, long run UK data.
Millennium of UK Macro Data in Python
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_millennium_of_macroeconomic_data as shown below.
from financetoolkit import Economics
economics = Economics(start_date='1700-01-01', end_date='2016-12-31')
millennium = economics.get_millennium_of_macroeconomic_data(
series=['Bank Rate', 'Consols', 'Consumer price inflation', 'Share prices']
)
millennium.loc[['1720', '1815', '1914', '1974', '2008']]
Which returns:
| Bank Rate | Consols / long-term government bond yields | Consumer price inflation | Share prices | |
|---|---|---|---|---|
| 1720 | 0.05 | 0.04 | 0.0515 | 2.416 |
| 1815 | 0.05 | 0.0504 | -0.144 | 1.0776 |
| 1914 | 0.05 | 0.0348 | 0.0255 | 42.7811 |
| 1974 | 0.115 | 0.1517 | 0.1573 | 65.26 |
| 2008 | 0.02 | 0.0459 | 0.036 | 2128.8 |
Parameters
The function accepts the following parameters:
- series (list[str] | str | None, optional): The series to include, matched on (part of) their name without regard to case, e.g. “Bank Rate” or [“consols”, “share prices”]. Defaults to None, which includes all of them.
- rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
- growth (bool, optional): Whether to return the growth data or the actual data.
- lag (int, optional): The number of periods to lag the data by.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.