Last issue

Included this week:

  • Global Property Price Indices
  • Oil Prices
  • Unemployment & The Live Register
  • Homebond

Real Residential Property Index

The Bank of International Settlements (BIS) - an intermediary for Central Banks, publishes house price indicies for countries and regions worldwide. The “Real” Property Price Index (RRPP), which I have accessed through the Federal Reserves database (FRED), deflates the series by CPI.

BIS reports on the RRPP can be found through this link.

Total Sample

I’ve taken a selection of countries and regions to begin reviewing the series. Going forward I will look for Sweden, Switzerland, New Zealand and Canada. - This is so we can view many markets with different central banks, and therefore different rate hiking environments. For now see below the entire series for each of the regions I’ve taken so far. The latest quarterly observation for each can be seen printed in each panel, note the time lag and that not all regions are from the same quarter.

The advantage of looking at the CPI deflated figure can be seen by looking at Ireland. Note we are not at “Celtic Tiger” levels in this series, which is a common headline which we see in the media.

That is not to say that the media is misleading (in this instance) as it true as per the CSO price index (See first graph through this link).

# Real Residential Property Prices

    # Coverage includes all types of existing dwellings in the whole country. The series is deflated using CPI.
 
    # For more information, please see https://www.bis.org/statistics/pp_detailed.htm.
 
    # Any use of the series shall be cited as follows: "Sources: National sources, BIS Residential Property Price database, http://www.bis.org/statistics/pp.htm."


# Load data from FRED https://fred.stlouisfed.org/series/DDSI02IEA156NWDB
## API KEY
fredr_set_key("8ad77f66768f9eb1e07da54d943df8f0")

########################### convert the "628" in the center of the code to get percentaage change per year

### United States
US.RRPP <- fredr(series_id = "QUSR628BIS",
              observation_start = as.Date("1970-01-01"),
              observation_end = as.Date("2022-04-01"))

### China: Coverage includes Q1 2007-Q4 2015: New dwellings in 70 cities in China; from Q1 2016: Existing buildings in 70 cities in China. The series is deflated using CPI.
CN.RRPP <- fredr(series_id = "QCNR628BIS",
                  observation_start = as.Date("2005-04-01"),
                  observation_end = as.Date("2022-04-01"))

### Australia: Coverage includes new and existing dwellings in 8 big cities. The series is deflated using CPI.
AU.RRPP <- fredr(series_id = "QAUR628BIS",
                  observation_start = as.Date("1970-01-01"),
                  observation_end = as.Date("2022-04-01"))

### Euro Area
EA.RRPP <- fredr(series_id = "QXMR628BIS",
                  observation_start = as.Date("1976-01-01"),
                  observation_end = as.Date("2022-04-01"))

### UK
UK.RRPP <- fredr(series_id = "QGBR628BIS",
                 observation_start = as.Date("1969-01-01"),
                 observation_end = as.Date("2022-04-01"))

### Japan
JP.RRPP <- fredr(series_id = "QJPR628BIS",
                 observation_start = as.Date("1956-01-01"),
                 observation_end = as.Date("2022-04-01"))

### Germany
DE.RRPP <- fredr(series_id = "QDER628BIS",
                 observation_start = as.Date("1971-01-01"),
                 observation_end = as.Date("2022-04-01"))

### Italy
IT.RRPP <- fredr(series_id = "QITR628BIS",
                 observation_start = as.Date("1948-01-01"),
                 observation_end = as.Date("2022-04-01"))

### Ireland
IR.RRPP <- fredr(series_id = "QIER628BIS",
                 observation_start = as.Date("1971-01-01"),
                 observation_end = as.Date("2022-04-01"))

### France
FR.RRPP <- fredr(series_id = "QFRR628BIS",
                 observation_start = as.Date("1970-01-01"),
                 observation_end = as.Date("2022-04-01"))

### Emerging Market Aggregate
EM.RRPP <- fredr(series_id = "Q4TR628BIS",#Q4TR771BIS for %YoY
                 observation_start = as.Date("2008-10-01"),
                 observation_end = as.Date("2022-04-01"))

### Russian Federation
RF.RRPP <- fredr(series_id = "QRUR628BIS",
                 observation_start = as.Date("2002-01-01"),
                 observation_end = as.Date("2022-04-01"))

## Add region variable then bind
AU.RRPP$region <- "Australia"
CN.RRPP$region <- "China"
DE.RRPP$region <- "Germany"
EA.RRPP$region <- "Euro Area"
EM.RRPP$region <- "Emerging Markets"
FR.RRPP$region <- "France"
IR.RRPP$region <- "Ireland"
IT.RRPP$region <- "Italy"
JP.RRPP$region <- "Japan"
RF.RRPP$region <- "Russian Federation"
UK.RRPP$region <- "United Kingdom"
US.RRPP$region <- "United States"

RRPP <- bind_rows(AU.RRPP,CN.RRPP,DE.RRPP,EA.RRPP,EM.RRPP,FR.RRPP,IR.RRPP,IT.RRPP,JP.RRPP,RF.RRPP,UK.RRPP,US.RRPP)

## Plot
RRPP.Max <- RRPP %>%
  group_by(region)%>%
  slice(which.max(date))
RRPP.Max$lab <- paste(as.yearqtr(RRPP.Max$date),":",round(RRPP.Max$value,digits=2))

RRPP %>%
  ggplot(aes(x=date,y=value,group=region,colour=region))+
  geom_line()+
  scale_colour_manual(values=c("#00843D","red","orange","navy","#0055A4","#FFCE00","darkgreen","#008C45","#CC3333","#1C3578","darkred","#3C3B6E"))+
  geom_hline(yintercept = 100,colour="black",linetype="dotted",alpha=0.6)+
  geom_text_repel(aes(label=round(value,digits=0)),colour="#666666",size=2.5,max.overlaps = 20)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Real Residential Property Price Index")+
  labs(caption="Source: Bank of International Settlements (BIS) via FRED API  |  The series is deflated using CPI")+
  xlab(NULL)+ylab("2010 = 100")+
  facet_wrap(~region,ncol=2)+
  geom_text(data=RRPP.Max,aes(label=lab,y=50,group=region,colour=region),hjust="right",size=3,fontface="bold",alpha=0.6)

A footnote on the China Series: Coverage includes Q1 2007-Q4 2015: New dwellings in 70 cities; from Q1 2016: Existing buildings in 70 cities

Sample Post 2010

RRPP_2010 <- RRPP %>%
  filter(date >="2010-01-01")

RRPP_2010 %>%
  ggplot(aes(x=date,y=value,group=region,colour=region))+
  geom_line()+
  scale_colour_manual(values=c("#00843D","red","orange","navy","#0055A4","#FFCE00","darkgreen","#008C45","#CC3333","#1C3578","darkred","#3C3B6E"))+
  geom_hline(yintercept = 100,colour="black",linetype="dotted",alpha=0.6)+
  geom_text_repel(aes(label=round(value,digits=0)),colour="#666666",size=2.5,max.overlaps = 6)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Real Residential Property Price Index")+
  labs(caption="Source: Bank of International Settlements (BIS) via FRED API  |  The series is deflated using CPI")+
  xlab(NULL)+ylab("2010 = 100")+
  facet_wrap(~region,ncol=2)+
  geom_text(data=RRPP.Max,aes(label=lab,y=70,group=region,colour=region),hjust="right",size=3,fontface="bold",alpha=0.6)

The Rate of Change

2010 to Date

# Percentage changes
### United States
US.RRPP.I <- fredr(series_id = "QUSR368BIS",
                   observation_start = as.Date("1970-01-01"),
                   observation_end = as.Date("2022-04-01"))

### China: Coverage includes Q1 2007-Q4 2015: New dwellings in 70 cities in China; from Q1 2016: Existing buildings in 70 cities in China. The series is deflated using CPI.
CN.RRPP.I <- fredr(series_id = "QCNR368BIS",
                   observation_start = as.Date("2005-04-01"),
                   observation_end = as.Date("2022-04-01"))

### Australia: Coverage includes new and existing dwellings in 8 big cities. The series is deflated using CPI.
AU.RRPP.I <- fredr(series_id = "QAUR368BIS",
                   observation_start = as.Date("1970-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Euro Area
EA.RRPP.I <- fredr(series_id = "QXMR368BIS",
                   observation_start = as.Date("1976-01-01"),
                   observation_end = as.Date("2022-04-01"))

### UK
UK.RRPP.I <- fredr(series_id = "QGBR368BIS",
                   observation_start = as.Date("1969-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Japan
JP.RRPP.I <- fredr(series_id = "QJPR368BIS",
                   observation_start = as.Date("1956-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Germany
DE.RRPP.I <- fredr(series_id = "QDER368BIS",
                   observation_start = as.Date("1971-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Italy
IT.RRPP.I <- fredr(series_id = "QITR368BIS",
                   observation_start = as.Date("1948-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Ireland
IR.RRPP.I <- fredr(series_id = "QIER368BIS",
                   observation_start = as.Date("1971-01-01"),
                   observation_end = as.Date("2022-04-01"))

### France
FR.RRPP.I <- fredr(series_id = "QFRR368BIS",
                   observation_start = as.Date("1970-01-01"),
                   observation_end = as.Date("2022-04-01"))

### Emerging Market Aggregate
EM.RRPP.I <- fredr(series_id = "Q4TR771BIS",
                   observation_start = as.Date("2008-10-01"),
                   observation_end = as.Date("2022-04-01"))

### Russian Federation
RF.RRPP.I <- fredr(series_id = "QRUR368BIS",
                   observation_start = as.Date("2002-01-01"),
                   observation_end = as.Date("2022-04-01"))

## Add region variable then bind
AU.RRPP.I$region <- "Australia"
CN.RRPP.I$region <- "China"
DE.RRPP.I$region <- "Germany"
EA.RRPP.I$region <- "Euro Area"
EM.RRPP.I$region <- "Emerging Markets"
FR.RRPP.I$region <- "France"
IR.RRPP.I$region <- "Ireland"
IT.RRPP.I$region <- "Italy"
JP.RRPP.I$region <- "Japan"
RF.RRPP.I$region <- "Russian Federation"
UK.RRPP.I$region <- "United Kingdom"
US.RRPP.I$region <- "United States"

RRPP.I <- bind_rows(AU.RRPP.I,CN.RRPP.I,DE.RRPP.I,EA.RRPP.I,EM.RRPP.I,FR.RRPP.I,IR.RRPP.I,IT.RRPP.I,JP.RRPP.I,RF.RRPP.I,UK.RRPP.I,US.RRPP.I)

# Plot
RRPP.I_2010 <- RRPP.I %>%
  filter(date >="2010-01-01")
colour.col <- ifelse(RRPP.I_2010$value < 0,"#CC0000","#1b5545")

RRPP.I_2010$colourcol <- ifelse(RRPP.I_2010$value < 0,"Negative","Positive")

RRPP.I_2010 %>%
  ggplot(aes(x=date,y=value,group=region,fill=colourcol))+
  geom_col(alpha=0.7)+
  scale_fill_manual(values=c("#CC0000","#1b5545"))+
  #scale_colour_manual(values=c("#00843D","red","orange","navy","#0055A4","#FFCE00","darkgreen","#008C45","#CC3333","#1C3578","darkred","#3C3B6E"))+
  geom_hline(yintercept = 0,colour="black",linetype="dotted",alpha=0.6)+
  #geom_text(aes(label=round(value,digits=0)),colour="#666666",size=2.5,vjust=1.5)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Real Residential Property Price Index")+
  labs(caption="Source: Bank of International Settlements (BIS) via FRED API  |  The series is deflated using CPI")+
  xlab(NULL)+ylab("Percentage - Annual")+
  facet_wrap(~region,ncol=2)#+geom_text(data=RRPP.Max,aes(label=lab,y=50,group=region,colour=region),hjust="right",size=3,fontface="bold",alpha=0.6)

Now that we have a clearer picture of the last decade, more importantly the Global Financial Crash, we will look at the rate of change from the period prior to the pandemic to date.

2018 to Date

RRPP.I_2018 <- RRPP.I %>%
  filter(date >="2018-01-01")
colour.col <- ifelse(RRPP.I_2018$value < 0,"#CC0000","#1b5545")

RRPP.I_2018 %>%
  ggplot(aes(x=date,y=value,group=region))+
  geom_col(fill=colour.col,alpha=0.7)+
  #scale_colour_manual(values=c("#00843D","red","orange","navy","#0055A4","#FFCE00","darkgreen","#008C45","#CC3333","#1C3578","darkred","#3C3B6E"))+
  geom_hline(yintercept = 0,colour="black",linetype="dotted",alpha=0.6)+
  geom_text(aes(label=round(value,digits=1)),colour="black",size=2.5,vjust=1.75)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Real Residential Property Price Index")+
  labs(caption="Source: Bank of International Settlements (BIS) via FRED API  |  The series is deflated using CPI")+
  xlab(NULL)+ylab("Percentage - Annual")+
  facet_wrap(~region,ncol=2)#+geom_text(data=RRPP.Max,aes(label=lab,y=50,group=region,colour=region),hjust="right",size=3,fontface="bold",alpha=0.6)

Oil

The big headline this week was that OPEC Plus (which includes Russia) will be cutting production by 2 million barrels per day. I read that this will actually be more like 1 million as they were falling short of quotas anyways. This is in response to sanctions and oil price caps. I’ve seen some iteration of the below chart in recent months. It’s naive to assume just because the trends are closely correlated that one will predict the other, however, OPEC are acting in what they assume to be in their best interests.

The US have responded by releasing their oil reserves, likely because they have mid term elections.

Why should we care? Higher prices for oil means more inflation, which means higher rate increases, which in turn means that recession is (even) more likely.

WTI is one of the benchmark oil prices.

# Load
## Oil
#BRENT <- getSymbols("BZ=F",src='yahoo',auto.assign=FALSE)
WTI <- getSymbols("CL=F",src='yahoo',auto.assign=FALSE)

#BRENT_AVG <- mean(BRENT$`BZ=F.Close`,na.rm=TRUE)
#BRENT_TAIL <- tail(BRENT,1)
#BRENT_CLOSE <- mean(BRENT_TAIL$`BZ=F.Close`,na.rm=TRUE)
WTI_AVG <- mean(WTI$`CL=F.Close`,na.rm=TRUE)
WTI_TAIL <- tail(WTI,1)
WTI_CLOSE <- mean(WTI_TAIL$`CL=F.Close`,na.rm=TRUE)

#BRENT.YTD <- BRENT %>%
 # subset(date(index(.))>= "2022-01-01")
WTI.YTD <- WTI %>%
  subset(date(index(.))>= "2022-01-01")

#BRENT.YTD_AVG <- mean(BRENT.YTD$`BZ=F.Close`,na.rm=TRUE)
#BRENT.YTD_TAIL <- tail(BRENT.YTD,1)
#BRENT.YTD_CLOSE <- mean(BRENT.YTD_TAIL$`BZ=F.Close`,na.rm=TRUE)
WTI.YTD_AVG <- mean(WTI.YTD$`CL=F.Close`,na.rm=TRUE)
WTI.YTD_TAIL <- tail(WTI.YTD,1)
WTI.YTD_CLOSE <- mean(WTI.YTD_TAIL$`CL=F.Close`,na.rm=TRUE)

# Run the past and present periods for a naive correlation
WTI.Past <- WTI %>%
  subset(date(index(.))>= "2007-01-01") %>%
  subset(date(index(.))<= "2008-12-31")
WTI.Pres <- WTI %>%
  subset(date(index(.))>= "2021-01-01")

WTI.Past <- data.frame(date=index(WTI.Past), coredata(WTI.Past))
WTI.Past$Period <- "Jan 07 to Dec 08"
WTI.Pres <- data.frame(date=index(WTI.Pres), coredata(WTI.Pres))
WTI.Pres$Period <- "Jan 21 to Date"

WTI.Past$day <- yday(WTI.Past$date)
WTI.Past$year <- format(WTI.Past$date,"%Y")
WTI.Past$a <- ifelse(WTI.Past$year == "2007",0,365)
WTI.Past$t <- WTI.Past$day+WTI.Past$a

WTI.Pres$day <- yday(WTI.Pres$date)
WTI.Pres$year <- format(WTI.Pres$date,"%Y")
WTI.Pres$a <- ifelse(WTI.Pres$year == "2021",0,365)
WTI.Pres$t <- WTI.Pres$day+WTI.Pres$a

WTI.Past_Pres <- rbind(WTI.Past,WTI.Pres)

arrows <- tibble(
  x1 = c(500,638),
  x2 = c(45,40)
  )

WTI.Past_Pres %>%
  ggplot(aes(x=t,y=CL.F.Close,group=Period))+
  geom_line(aes(colour=Period),size=1.25,alpha=0.7)+
  scale_colour_manual(values=c("#FF3B47","black"))+
  theme_bw()+
  theme(legend.position = "bottom")+
  ylab("USD per barrell")+xlab("t = days")+
  ggtitle("West Texas Intermediary (WTI)")+
  geom_vline(xintercept=641,size=0.25,alpha=0.9,linetype="dashed",colour="navy")+
  geom_vline(xintercept=561,size=0.25,alpha=0.9,linetype="dashed")+
  annotate("text", x = 550, y = 45, label = "OPEC Plus supply cut hits market",size=3,colour="navy")+
  annotate("text", x = 475, y = 60, label = "Biden visit to Saudi Arabia",size=3)

Unemployment

Headline number is 4.3 and stable, the 25-74 year cohort continues the decline.

MUM01 <- cso_get_data("MUM01")
MUM01 <- MUM01 %>%
  pivot_longer(!1:3, names_to = "yearm")

MUM01 <- MUM01 %>%
  filter(Statistic == "Seasonally Adjusted Monthly Unemployment Rate")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "15 - 74 years" | Age.Group == "25 - 74 years")
MUM01<- MUM01 %>%
  separate(yearm, c("Year", "Month"), sep=" ")
MUM01$Year <- as.integer(MUM01$Year)
MUM01$Date <- as.Date(paste(paste(MUM01$Month, sep = " ", "1"),sep = " ",MUM01$Year),"%B %d %Y")

MUM01_Max <- MUM01 %>%
  group_by(Age.Group)%>%
  slice(which.max(Date))
MUM01_Max$lab <- paste(MUM01_Max$Month, ":", MUM01_Max$value)

MUM01_16 <- MUM01 %>%
  filter(Year >= "2016")
MUM01_21 <- MUM01 %>%
  filter(Year >= "2021")
MUM01_YTD <- MUM01 %>%
  filter(Year >= "2022")

Fig.Unemp.1 <- ggplot(data=MUM01, aes(x=Date, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre", linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  theme_bw()+
  labs(subtitle = "January 1998 to date",
       y=NULL,
       x=NULL)+  theme(legend.position = "none")

Fig.Unemp.2 <- ggplot(data=MUM01_16, aes(x=Date, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  geom_text_repel(aes(label=value),data = MUM01_16, size = 2.75,colour="black",max.overlaps = 4,alpha=0.5)+
  geom_text(aes(label=lab,colour=Age.Group),data = MUM01_Max, size = 3.25,hjust=1,vjust=2, fontface = "bold")+
  theme_bw()+
  labs(title = "Unemployment" ,
       subtitle = "2016 to date",
       y="Unemployment Rate",
       x="Month")+
  theme(legend.position = "bottom")

Fig.Unemp.3 <- ggplot(data=MUM01_21, aes(x=Date, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre", linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  theme_bw()+
  labs(subtitle = "January 2021 to date",
       y=NULL,
       x=NULL)+  theme(legend.position = "none")

Fig.Unemp.4 <- ggplot(data=MUM01_YTD, aes(x=Date, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre", linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  theme_bw()+
  labs(subtitle = "Year to date",
       y=NULL,
       x=NULL)+  theme(legend.position = "none")

Fig.Unemp.RightFacet<- Fig.Unemp.1 + Fig.Unemp.3 + Fig.Unemp.4 + plot_layout(nrow=3)

Fig.Unemp.2 + Fig.Unemp.RightFacet+ plot_layout(ncol=2,widths = c(2,1))

Post 2020 where are the unemployed? - Approximately one sixth of those coming from “No occupation” were under 25. I am assuming the balance are long term unemployed but I do not have that figure to hand.

LRM13 <- cso_get_data("LRM13")

LRM13 <- LRM13 %>%
  pivot_longer(!1:4, names_to = "yearm")

LRM13<- LRM13 %>%
  separate(yearm, c("Year", "Month"), sep=" ")
LRM13$Year <- as.integer(LRM13$Year)
LRM13$Date <- as.Date(paste(paste(LRM13$Month, sep = " ", "1"),sep = " ",LRM13$Year),"%B %d %Y")

# LRM13.1 <- LRM13 %>%
#   filter(Last.Held.Occupation == "All broad occupational groups")%>%
#   filter(Sex == "Both sexes") %>%
#   filter(Age.Group == "All ages")

LRM13.2 <- LRM13 %>%
  filter(Last.Held.Occupation != "All broad occupational groups")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "All ages")

LRM13.2_Max <- LRM13.2 %>%
  group_by(Last.Held.Occupation)%>%
  slice(which.max(Date))
LRM13.2_Max$lab = paste(LRM13.2_Max$Month, ":", LRM13.2_Max$value)

LRM13.2_20 <- LRM13.2 %>%
  filter(Date>="2020-01-01")

options(scipen = 999)
LRM13.2_20 %>%
  ggplot(aes(x=Date,y=value,group=Last.Held.Occupation,colour=Last.Held.Occupation))+
  geom_line()+
  geom_text_repel(aes(label=value),max.overlaps=6,colour="black",alpha=0.6,size=2.5)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Persons on the Live Register")+
  labs(subtitle="LRM13: By Last Held Occupation")+
  ylab("number")+
  geom_text_repel(data=LRM13.2_Max,aes(y=50000,label=lab),alpha=0.4)+
  facet_wrap(~Last.Held.Occupation,ncol=2)

LRM13.3 <- LRM13 %>%
  filter(Last.Held.Occupation != "All broad occupational groups")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "Under 25 years")

LRM13.3_Max <- LRM13.3 %>%
  group_by(Last.Held.Occupation)%>%
  slice(which.max(Date))
LRM13.3_Max$lab = paste(LRM13.3_Max$Month, ":", LRM13.3_Max$value)

LRM13.3_20 <- LRM13.3 %>%
  filter(Date>="2020-01-01")
LRM13.3_20 %>%
  ggplot(aes(x=Date,y=value,group=Last.Held.Occupation,colour=Last.Held.Occupation))+
  geom_line()+
  geom_text_repel(aes(label=value),max.overlaps=6,colour="black",alpha=0.6,size=2.5)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("Persons on the Live Register: Under 25 years")+
  labs(subtitle="LRM13: By Last Held Occupation")+
  ylab("number")+
  geom_text_repel(data=LRM13.3_Max,aes(y=9000,label=lab),alpha=0.4)+
  facet_wrap(~Last.Held.Occupation,ncol=2)

Homebond

This is the first time I’ve seen this issued. The quarterly data has more detail, both in time period and area as its broken into counties. So I will take that on for next week.

HSM10 <- cso_get_data("HSM10")

HSM10 <- HSM10 %>%
  pivot_longer(!1:2, names_to = "yearm")

HSM10<- HSM10 %>%
  separate(yearm, c("Year", "Month"), sep=" ")
HSM10$Year <- as.integer(HSM10$Year)
HSM10$Date <- as.Date(paste(paste(HSM10$Month, sep = " ", "1"),sep = " ",HSM10$Year),"%B %d %Y")

HSM10 <- na.omit(HSM10)
HSM10$SMA.6 <- round(SMA(HSM10$value,n=6),digits=2)
HSM10_Max <- HSM10 %>%
  slice(which.max(Date))
HSM10_Max$lab <- paste(HSM10_Max$Month, ":", HSM10_Max$value)

HSM10 %>%
  ggplot(aes(x=Date,y=SMA.6,group=State,colour=STATISTIC))+
  geom_line(alpha=0.7,size=1.5)+
  geom_line(aes(x=Date,y=value,group=State,colour=STATISTIC),alpha=0.5)+
  geom_text_repel(data=HSM10_Max,aes(label=lab),colour="black")+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("New House Registrations: HSM10")+
  labs(subtitle="6 month moving average")