Photo Credit: Pixabay

A Comparison of G7 Countries House Price Movement

Python, FRED, Economic Data, Housing Price

Susan Li
3 min readJun 21, 2022


Federal Reserve Economic Data (FRED) is an online database maintained by the Federal Reserve Bank of St. Louis that provides over 800,000 economic data series from more than 100 public and proprietary sources.

With FRED API key, you can use any programming language that can parse XML or JSON to query FRED data free of charge.

In this post, we will write Python code to retrieve and compare G7 countries’ housing price movement data for the past over 50 years.

To get started.

The Data

We now have what we need. Let’s go fetch the data.

The series id for “Real Residential Property Prices for Canada” is “QCAR628BIS”, the series start date is “1970–01–01” and end date is “2021–10–01”.
Table 1
Figure 1

Here we have Real Residential Property Prices data for Canada from 1970–01–01 to 2021–10–01.

With the information we have, now we are going to fetch all G7 countries housing data.
Table 2

In this series, FRED has the housing data for 51 countries. We will need G7 countries.
Table 3
Table 4

The last step is to add a “country” column.
Table 5
Figure 2

G7 countries house prices’ long-term trend is mixed. Canada has significant appreciated over the long period of time, and the UK has been in a “weak” property market over the past 10 years. While Italy is trending down. The U.S housing market is still recovering from its “bubble”.

Jupyter notebook can be found on Github. Enjoy the rest of the week!

Sources: National sources, BIS Residential Property Price database,



Susan Li

Changing the world, one post at a time. Sr Data Scientist, Toronto Canada.