House Prices

Data - Fred

Info

source dataset .html .RData

fred

housing

2024-09-14 2024-09-18

Data on housing

source dataset .html .RData

bdf

RPP

2024-07-26 2024-07-01

bis

LONG_PP

2024-08-09 2024-05-10

bis

SELECTED_PP

2024-08-09 2024-05-10

ecb

RPP

2024-09-15 2024-09-15

eurostat

ei_hppi_q

2024-09-15 2024-09-15

eurostat

hbs_str_t223

2024-09-15 2024-09-15

eurostat

prc_hicp_midx

2024-09-15 2024-09-15

eurostat

prc_hpi_q

2024-09-15 2024-09-14

fred

housing

2024-09-14 2024-09-18

insee

IPLA-IPLNA-2015

2024-09-15 2024-09-14

oecd

housing

2024-09-15 2020-01-18

oecd

SNA_TABLE5

2024-09-11 2023-10-19

LAST_COMPILE

LAST_COMPILE
2024-09-18

Last

date Nobs
2024-08-01 7
2024-07-01 9

variable

variable Variable Nobs
CPIAUCSL Consumer Price Index for All Urban Consumers: All Items in U.S. City Average 932
CPILFESL Consumer Price Index for All Urban Consumers: All Items Less Food and Energy in U.S. City Average 812
CSUSHPINSA S&P CoreLogic Case-Shiller U.S. National Home Price Index 594
MICH University of Michigan: Inflation Expectation 559
CUSR0000SEHA Consumer Price Index for All Urban Consumers: Rent of Primary Residence in U.S. City Average 524
CUSR0000SAS2RS Consumer Price Index for All Urban Consumers: Rent of Shelter in U.S. City Average 416
ASTMA All Sectors; Total Mortgages; Asset, Level 315
A255RD3Q086SBEA Imports of goods (implicit price deflator) 310
CP00MI15EA20M086NEST Harmonized Index of Consumer Prices: All-items HICP for Euro area (20 countries) 297
CP041MI15EA20M086NEST Harmonized Index of Consumer Prices: Actual rentals for housing for Euro area (20 countries) 297
TOTNRGFOODEA20MI15XM Harmonized Index of Consumer Prices: Overall Index Excluding Energy, Food, Alcohol, and Tobacco for Euro area (20 countries) 285
DPCCRV1Q225SBEA Personal Consumption Expenditures (PCE) Excluding Food and Energy (Chain-Type Price Index) 261
MSPUS Median Sales Price of Houses Sold for the United States 246
USSTHPI All-Transactions House Price Index for the United States 198
FPCPITOTLZGUSA Inflation, consumer prices for the United States 64
FIXHAI Housing Affordability Index (Fixed) 13

Housing Affordability Index

Code
housing %>%
  filter(variable %in% c("FIXHAI")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value)) + 
  theme_minimal() + xlab("") + ylab("Housing Affordability Index") +
  scale_x_date(breaks = "1 month",
               labels = date_format("%Y %b")) + 
  scale_y_log10(breaks = seq(10, 400, 2)) + 
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

Rents

inflation

12 months

English

Code
housing %>%
  filter(variable %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA",
                         "CP00MI15EA20M086NEST", "CPIAUCSL")) %>%
  #add_row(date = as.Date("2023-10-01"), variable = "CP00MI15EA20M086NEST", value = 124.55) %>%
  select(date, variable, value) %>%
  group_by(variable) %>%
  arrange(date) %>%
  mutate(value = value/lag(value, 12)-1) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  ungroup %>%
  mutate(type = case_when(variable  %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA") ~ "Rents",
                          variable  %in% c("CP00MI15EA20M086NEST", "CPIAUCSL") ~ "All")) %>%
  mutate(country = case_when(variable %in% c("CP041MI15EA20M086NEST", "CP00MI15EA20M086NEST") ~ "Euro area (HICP)",
                              variable %in% c("CUSR0000SEHA", "CPIAUCSL") ~ "US (CPI)")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, linetype = type, color = country)) + 
  theme_minimal() + xlab("") + ylab("Inflation (%)") +
  scale_x_date(breaks = seq(1870, 2030, 1) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1)) + 
  scale_color_manual(values = c("#003399", "#B22234")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

French

All
Code
Sys.setlocale("LC_TIME", "fr_CA.UTF-8")
# [1] "fr_CA.UTF-8"
Code
housing %>%
  filter(variable %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA",
                         "CP00MI15EA20M086NEST", "CPIAUCSL")) %>%
  #add_row(date = as.Date("2023-10-01"), variable = "CP00MI15EA20M086NEST", value = 124.55) %>%
  select(date, variable, value) %>%
  group_by(variable) %>%
  arrange(date) %>%
  mutate(value = value/lag(value, 12)-1) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  ungroup %>%
  mutate(type = case_when(variable  %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA") ~ "Loyers",
                          variable  %in% c("CP00MI15EA20M086NEST", "CPIAUCSL") ~ "Tous")) %>%
  mutate(country = case_when(variable %in% c("CP041MI15EA20M086NEST", "CP00MI15EA20M086NEST") ~ "Zone euro (IPCH)",
                              variable %in% c("CUSR0000SEHA", "CPIAUCSL") ~ "États-Unis (CPI)")) %>%
  mutate(country = factor(country, levels = c("Zone euro (IPCH)", "États-Unis (CPI)")),
         type = factor(type, levels = c("Tous", "Loyers"))) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, linetype = type, color = country)) + 
  theme_minimal() + xlab("") + ylab("Inflation (%)") +
  scale_x_date(breaks = seq(1870, 2030, 1) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1)) + 
  scale_color_manual(values = c("#003399", "#B22234")) +
  scale_linetype_manual(values = c("dashed", "solid")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

Code
Sys.setlocale("LC_TIME", "en_CA.UTF-8")
# [1] "en_CA.UTF-8"

6 months

Code
housing %>%
  filter(variable %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA",
                         "CP00MI15EA20M086NEST", "CPIAUCSL",
                         "TOTNRGFOODEA20MI15XM", "CPILFESL")) %>%
  #add_row(date = as.Date("2023-10-01"), variable = "CP00MI15EA20M086NEST", value = 124.55) %>%
  select(date, variable, value) %>%
  group_by(variable) %>%
  arrange(date) %>%
  mutate(value = value/lag(value, 6)-1) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  ungroup %>%
  mutate(type = case_when(variable  %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA") ~ "Rents",
                          variable  %in% c("CP00MI15EA20M086NEST", "CPIAUCSL") ~ "All",
                          variable  %in% c("TOTNRGFOODEA20MI15XM", "CPILFESL") ~ "Core")) %>%
  mutate(country = case_when(variable %in% c("CP041MI15EA20M086NEST", "CP00MI15EA20M086NEST", "TOTNRGFOODEA20MI15XM") ~ "Euro area (HICP)",
                              variable %in% c("CUSR0000SEHA", "CPIAUCSL", "CPILFESL") ~ "US (CPI)")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, linetype = type, color = country)) + 
  theme_minimal() + xlab("") + ylab("Inflation, 6 months (%)") +
  scale_x_date(breaks = seq(1870, 2030, 1) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1)) + 
  scale_color_manual(values = c("#003399", "#B22234")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

3 months

Code
housing %>%
  filter(variable %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA",
                         "CP00MI15EA20M086NEST", "CPIAUCSL",
                         "TOTNRGFOODEA20MI15XM", "CPILFESL")) %>%
  #add_row(date = as.Date("2023-10-01"), variable = "CP00MI15EA20M086NEST", value = 124.55) %>%
  select(date, variable, value) %>%
  group_by(variable) %>%
  arrange(date) %>%
  mutate(value = value/lag(value, 3)-1) %>%
  filter(date >= as.Date("2012-01-01")) %>%
  ungroup %>%
  mutate(type = case_when(variable  %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA") ~ "Rents",
                          variable  %in% c("CP00MI15EA20M086NEST", "CPIAUCSL") ~ "All",
                          variable  %in% c("TOTNRGFOODEA20MI15XM", "CPILFESL") ~ "Core")) %>%
  mutate(country = case_when(variable %in% c("CP041MI15EA20M086NEST", "CP00MI15EA20M086NEST", "TOTNRGFOODEA20MI15XM") ~ "Euro area (HICP)",
                              variable %in% c("CUSR0000SEHA", "CPIAUCSL", "CPILFESL") ~ "US (CPI)")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, linetype = type, color = country)) + 
  theme_minimal() + xlab("") + ylab("Inflation, 3 months (%)") +
  scale_x_date(breaks = seq(1870, 2030, 1) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1)) + 
  scale_color_manual(values = c("#003399", "#B22234")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

Price index

Just housing

Code
housing %>%
  filter(variable %in% c("CP041MI15EA20M086NEST", "CUSR0000SEHA"),
         date >= as.Date("2020-01-01")) %>%
  select(date, variable, value) %>%
  group_by(variable) %>%
  arrange(date) %>%
  mutate(value = 100*value/value[1]) %>%
  ungroup %>%
  mutate(Variable = case_when(variable == "CP041MI15EA20M086NEST" ~ "Euro area HICP Rents",
                              variable == "CUSR0000SEHA" ~ "US CPI Rents")) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = Variable)) + 
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1870, 2030, 1) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) + 
  scale_y_log10(breaks = seq(100, 200, 2)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank())

Real House Prices

Growth

Code
housing %>%
  filter(variable %in% c("CPIAUCSL", "CSUSHPINSA"),
         month(date) == 1,
         date >= as.Date("1987-01-01")) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(CPIAUCSL = 100*(log(CPIAUCSL) - lag(log(CPIAUCSL))),
         CSUSHPINSA = 100*(log(CSUSHPINSA) - lag(log(CSUSHPINSA)))) %>%
  gather(variable, value, -date) %>%
  left_join(variable, by = "variable") %>%
  ggplot(.) + geom_line(aes(x = date, y = value / 100, color = Variable)) + 
  theme_minimal() + xlab("") + ylab("Inflation Rates (%)") +
  scale_x_date(breaks = seq(1870, 2030, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 2),
                     labels = scales::percent_format(accuracy = 1)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.4, 0.2),
        legend.title = element_blank())

Index

Code
housing %>%
  filter(variable %in% c("CPIAUCSL", "CSUSHPINSA"),
         date >= as.Date("2000-01-01")) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(`Nominal S&P/Case-Shiller Index` = CSUSHPINSA,
         CSUSHPINSA_real = CSUSHPINSA/CPIAUCSL,
         `Real S&P/Case-Shiller Index` = 100*CSUSHPINSA_real / CSUSHPINSA_real[1]) %>%
  select(date, `Nominal S&P/Case-Shiller Index`, `Real S&P/Case-Shiller Index`) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  mutate(value = 100*value/value[date == as.Date("2006-10-01")]) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable)) + 
  theme_minimal() + xlab("") + ylab("S&P/Case-Shiller Index (Nov. 2006 Peak = 100)") +
  scale_x_date(breaks = seq(1870, 2024, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_log10(breaks = seq(10, 400, 10)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

Median House Prices

All

Code
housing %>%
  filter(variable %in% c("MSPUS", "CPIAUCSL"),
         date >= as.Date("1965-01-01"),
         month(date) %in% c(1, 4, 7, 10)) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(`Nominal Median Sales Price of Houses` = MSPUS,
         MSPUS_real = MSPUS/CPIAUCSL,
         `Real Median Sales Price of Houses` = 100*MSPUS_real / MSPUS_real[1]) %>%
  select(date, `Nominal Median Sales Price of Houses`, `Real Median Sales Price of Houses`) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  mutate(value = 100*value/value[date == as.Date("2007-01-01")]) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable)) + 
  theme_minimal() + xlab("") + ylab("Median Sales Price of Houses (2007 = 100)") +
  scale_x_date(breaks = seq(1870, 2024, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_log10(breaks = seq(10, 400, 10)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

1980-

Code
housing %>%
  filter(variable %in% c("MSPUS", "CPIAUCSL"),
         date >= as.Date("1980-01-01"),
         month(date) %in% c(1, 4, 7, 10)) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(`Nominal Median Sales Price of Houses` = MSPUS,
         MSPUS_real = MSPUS/CPIAUCSL,
         `Real Median Sales Price of Houses` = 100*MSPUS_real / MSPUS_real[1]) %>%
  select(date, `Nominal Median Sales Price of Houses`, `Real Median Sales Price of Houses`) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  mutate(value = 100*value/value[date == as.Date("2007-01-01")]) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable)) + 
  theme_minimal() + xlab("") + ylab("Median Sales Price of Houses (2007 = 100)") +
  scale_x_date(breaks = seq(1870, 2024, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_log10(breaks = seq(10, 400, 10)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

1990-

Code
housing %>%
  filter(variable %in% c("MSPUS", "CPIAUCSL"),
         date >= as.Date("1990-01-01"),
         month(date) %in% c(1, 4, 7, 10)) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(`Nominal Median Sales Price of Houses` = MSPUS,
         MSPUS_real = MSPUS/CPIAUCSL,
         `Real Median Sales Price of Houses` = 100*MSPUS_real / MSPUS_real[1]) %>%
  select(date, `Nominal Median Sales Price of Houses`, `Real Median Sales Price of Houses`) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  mutate(value = 100*value/value[date == as.Date("2007-01-01")]) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable)) + 
  theme_minimal() + xlab("") + ylab("Median Sales Price of Houses (2007 = 100)") +
  scale_x_date(breaks = seq(1870, 2024, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_log10(breaks = seq(10, 400, 10)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

2000-

Code
housing %>%
  filter(variable %in% c("MSPUS", "CPIAUCSL"),
         date >= as.Date("2000-01-01"),
         month(date) %in% c(1, 4, 7, 10)) %>%
  select(date, variable, value) %>%
  spread(variable, value) %>%
  mutate(`Nominal Median Sales Price of Houses` = MSPUS,
         MSPUS_real = MSPUS/CPIAUCSL,
         `Real Median Sales Price of Houses` = 100*MSPUS_real / MSPUS_real[1]) %>%
  select(date, `Nominal Median Sales Price of Houses`, `Real Median Sales Price of Houses`) %>%
  gather(variable, value, -date) %>%
  group_by(variable) %>%
  mutate(value = 100*value/value[date == as.Date("2007-01-01")]) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable)) + 
  theme_minimal() + xlab("") + ylab("Median Sales Price of Houses (2007 = 100)") +
  scale_x_date(breaks = seq(1870, 2024, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) + 
  scale_y_log10(breaks = seq(10, 400, 10)) + 
  scale_color_manual(values = c("#2D68C4", "#F2A900", "#000000")) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")