Headline Roundup

Eamon Ryan says there is “no end in sight to the energy crisis”, as European Governments prepare to intervene in the market.

Governments are scrambling. The EU have been stockpiling gas for the winter, likely adding to the price surge. Price caps and tax relief are being discussed across Europe. This will dominate headlines in the coming months as solutions are not as obvious as it is often perceived. The price of electricity is already up 26.7% and gas is up 37.5% from next month (Electric Ireland). Eamon Ryan is wrestling with this parabolic growth above. Lets see what measures the government will take in the lead up to the budget.

UK Inflation hits double digits as food prices hit 40 year high.

UK inflation hits 10.1% up from 9.4%. Citibank see it peaking at 18.6% in January and Goldman Sachs hit headlines with modelling scenarios of 18% and 22% for the UK, although that’s not their base case which is closer to 13%.

German Inflation nears 50 year high of 8.8% for August, as the Euro Area sees 9.1%.

The news that German gas stores filling faster than anticipated is a small reprieve as Russia, again, halted the flow of gas through Nord Stream 1 for “maintenance”. The FT reported on Wednesday that some German manufacturers have already begun halting production due to the increased energy costs.

It is beginning to look to me that the ECB will raise by 0.75 in September.

Local authorities owed €105m in unpaid rent. - The Irish Times report.

“Local authorities across the State are owed almost €105 million in unpaid rent, with 285 social housing tenants having arrears in excess of €20,000 each”. According to figures from the IRish Times It is often very difficult to evict someone in Ireland, contrary to popular belief. Particularly in social housing some degree of freeloading is inevitable, local authorities aren’t effectively staffed to police it. Foreshadowing for the mess that a right to housing referendum would/will be.

Robert Troy resigns, replaced with Dara Calleary.

Robert Troy resigns as Junior Minister for the Department of Enterprise, for failing to disclose his property holdings. Part of this role was company regulation, so the man who was over company regulation lacked the due diligence to register his potential conflicts of interest. From what I gather he has not committed any major offence bar omitting these details. - Architect of his own demise, how are companies to take a senior civil servant seriously when they do not take their own administration seriously. He is replaced by Dara Calleary, who himself had to resign two years ago because he was at the golf do in Clifden. Calleary did hold a similar position before in Brain Cowens government, at the time it had just become apparent that the cost of bailing out the Irish banking system would be €50 billion. Calleary was sent to meet the heavy weights in Europe, of which he described Jean Claude Trichet, then head of the ECB as a “prick”, and Dominic Strauss-Khan, then the MD of the IMF “a bigger prick”. (Unrelated but the latter stood trial, and was acquitted, of “aggravated pimping”. So perhaps Calleary was onto something)

The Last Soviet President Mikhaul Gorbachev dies aged 91.

Safe to say the man who advocated “glasnost”: openness, in the Soviet Union, which unwittingly lead to it’s dissolution, will not be receiving a state funeral from the man who considers it the “greatest geopolitical catastrophe of the century”.


US & Markets

Fed Chair Jerome Powell comes out with hawkish sentiment at Jackson Hole

Jackson Hole is a yearly central bank symposium, here Powell gave a “hawkish” speech. - Essentially saying any notions that the Fed would not raise rates further and hold them for a prolonged period is unfounded. Thus tighter conditions and bad news for markets. The next 12 months in America, and the world will be a series of trade offs between battling inflation through tightening financial conditions, and providing relief to a cost of living crisis. Remedying one, often exacerbates the other issue.

For instance, Biden is pushing to forgive a substantial amount of student debt. This will put more money into the pockets of people, who are likely to spend it. More spending, perhaps more inflation. This is the trade-off.

# Ensure to change CSV name to apprpriate version number / working directory
SNP <- getSymbols("^GSPC",src='yahoo',auto.assign=FALSE)
ISEQ <- getSymbols("^ISEQ",src='yahoo',auto.assign=FALSE)

SNP$Close.MA5 <- rollmean(SNP$GSPC.Close,5)
SNP$Close.MA5 <- Lag(SNP$Close.MA5,2)
SNP$Close.MA10 <- rollmean(SNP$GSPC.Close,10)
SNP$Close.MA10 <- Lag(SNP$Close.MA10,5)
ISEQ$Close.MA5 <- rollmean(ISEQ$ISEQ.Close,5)
ISEQ$Close.MA5 <- Lag(ISEQ$Close.MA5,2)
ISEQ$Close.MA10 <- rollmean(ISEQ$ISEQ.Close,10)
ISEQ$Close.MA10 <- Lag(ISEQ$Close.MA10,5)

write.csv(SNP,"SNP.N2.2.csv")
write.csv(ISEQ,"ISEQ.N2.2.csv")

SNP_Aug22 <- SNP %>%
  subset(date(index(.))>= "2022-08-01")
ISEQ_Aug22 <- ISEQ %>%
  subset(date(index(.))>= "2022-08-01")
SNP_YTD <- SNP %>%
  subset(date(index(.))>= "2022-01-01")
ISEQ_YTD <- ISEQ %>%
  subset(date(index(.))>= "2022-01-01")

Markets

Fig.SNP.YTD<-ggplot(data=SNP_YTD,aes(x=Index,y=GSPC.Close,group=1))+
  geom_line(data=SNP_YTD,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#9200ff")+
  geom_line(data=SNP_YTD,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#290047",linetype="dashed")+
  geom_line(colour="#D49CFE",size=1)+
  geom_text_repel(aes(label=round(GSPC.Close,digits=2)),data = SNP_YTD, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
  theme_dark()+
  ggtitle("S&P YTD")+
  xlab("Dates")

Fig.ISEQ.YTD<-ggplot(data=ISEQ_YTD,aes(x=Index,y=ISEQ.Close,group=1))+
  geom_line(data=ISEQ_YTD,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#15e600")+
  geom_line(data=ISEQ_YTD,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#0f6606",linetype="dashed")+
  geom_line(colour="#A5FE9C",size=1)+
  geom_text_repel(aes(label=round(ISEQ.Close,digits=2)),data = ISEQ_YTD, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
  theme_dark()+
  ggtitle("ISEQ YTD")+
  xlab("Dates")

Fig.SNP.YTD+Fig.ISEQ.YTD+plot_layout(ncol=2)+
  labs(caption = "Moving Averages: dashed line = 5 day, solid line = 10 day")

Fig.SNP.Aug<-ggplot(data=SNP_Aug22,aes(x=Index,y=GSPC.Close,group=1))+
  geom_line(data=SNP_Aug22,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#9200ff")+
  geom_line(data=SNP_Aug22,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#290047",linetype="dashed")+
  geom_line(colour="#D49CFE",size=1)+
  geom_text_repel(aes(label=round(GSPC.Close,digits=2)),data = SNP_Aug22, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
  theme_dark()+
  ggtitle("S&P Aug22")+
  xlab("Dates")

Fig.ISEQ.Aug<-ggplot(data=ISEQ_Aug22,aes(x=Index,y=ISEQ.Close,group=1))+
  geom_line(data=ISEQ_Aug22,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#15e600")+
  geom_line(data=ISEQ_Aug22,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#0f6606",linetype="dashed")+
  geom_line(colour="#A5FE9C",size=1)+
  geom_text_repel(aes(label=round(ISEQ.Close,digits=2)),data = ISEQ_Aug22, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
  theme_dark()+
  ggtitle("ISEQ Aug22")+
  xlab("Dates")

Fig.SNP.Aug+Fig.ISEQ.Aug+plot_layout(ncol=2)+
  labs(caption = "Moving Averages: dashed line = 5 day, solid line = 10 day")

Commodities

Energy Prices

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

write.csv(BRENT,"BRENT.N2.2.csv")
write.csv(WTI,"WTI.N2.2.csv")
write.csv(NGAS,"NGAS.N2.2.csv")

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)
NGAS_AVG <- mean(NGAS$`NG=F.Close`,na.rm=TRUE)
NGAS_TAIL <- tail(NGAS,1)
NGAS_CLOSE <- mean(NGAS_TAIL$`NG=F.Close`,na.rm=TRUE)

#Oil Plots
Fig.Brent1<-ggplot(data=BRENT,aes(x=Index,y=`BZ=F.Close`,group=1))+
  geom_line()+
  geom_hline(yintercept=BRENT_CLOSE,alpha=0.5)+
  geom_hline(yintercept=BRENT_AVG,linetype='dashed')+
  theme_bw()+
  ggtitle("Brent Crude Price (BZ=F)")+
  ylab("Price - USD")+
  xlab("Dates")

Fig.WTI1<-ggplot(data=WTI,aes(x=Index,y=`CL=F.Close`,group=1))+
  geom_line(colour="darkgrey")+
  geom_hline(yintercept=WTI_CLOSE,colour="darkgrey",alpha=0.8)+
  geom_hline(yintercept=WTI_AVG,linetype='dashed',colour="darkgrey")+
  theme_bw()+
  ggtitle("West Texas Intermediary (WTI) Price (CL=F)")+
  ylab("Price - USD")+
  xlab("Dates")

#Gas Plots
Fig.NGAS1<-ggplot(data=NGAS,aes(x=Index,y=`NG=F.Close`,group=1))+
  geom_line(colour="darkblue")+
  geom_hline(yintercept=NGAS_CLOSE,colour="darkblue",alpha=0.5)+
  geom_hline(yintercept=NGAS_AVG,linetype='dashed',colour="darkblue")+
  theme_bw()+
  ggtitle("Natural Gas Price (NG=F)")+
  ylab("Price - USD")+
  xlab("Dates")+
  labs(caption = "dashed line = average, solid line = closing price")

# Total Series for Energy
Fig.Energy.TS<-Fig.Brent1 + Fig.WTI1 + Fig.NGAS1 +
  plot_layout(nrow=3)
BRENT_YTD <- BRENT %>%
  subset(date(index(.))>= "2022-01-01")
WTI_YTD <- WTI %>%
  subset(date(index(.))>= "2022-01-01")
NGAS_YTD <- NGAS %>%
  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)
NGAS_YTD_AVG <- mean(NGAS_YTD$`NG=F.Close`,na.rm=TRUE)
NGAS_YTD_TAIL <- tail(NGAS_YTD,1)
NGAS_YTD_CLOSE <- mean(NGAS_YTD_TAIL$`NG=F.Close`,na.rm=TRUE)

#Oil Plots
Fig.Brent2<-ggplot(data=BRENT_YTD,aes(x=Index,y=`BZ=F.Close`,group=1))+
  geom_line()+
  geom_hline(yintercept=BRENT_YTD_CLOSE,alpha=0.5)+
  geom_hline(yintercept=BRENT_YTD_AVG,linetype='dashed')+
  theme_bw()+
  ggtitle("Brent Crude Price (BZ=F)")+
  ylab("Price - USD")+
  xlab("Dates")

Fig.WTI2<-ggplot(data=WTI_YTD,aes(x=Index,y=`CL=F.Close`,group=1))+
  geom_line(colour="darkgrey")+
  geom_hline(yintercept=WTI_YTD_CLOSE,colour="darkgrey",alpha=0.8)+
  geom_hline(yintercept=WTI_YTD_AVG,linetype='dashed',colour="darkgrey")+
  theme_bw()+
  ggtitle("West Texas Intermediary (WTI) Price (CL=F)")+
  ylab("Price - USD")+
  xlab("Dates")

#Gas Plots
Fig.NGAS2<-ggplot(data=NGAS_YTD,aes(x=Index,y=`NG=F.Close`,group=1))+
  geom_line(colour="darkblue")+
  geom_hline(yintercept=NGAS_YTD_CLOSE,colour="darkblue",alpha=0.5)+
  geom_hline(yintercept=NGAS_YTD_AVG,linetype='dashed',colour="darkblue")+
  theme_bw()+
  ggtitle("Natural Gas Price (NG=F)")+
  ylab("Price - USD")+
  xlab("Dates")+
  labs(caption = "dashed line = average, solid line = closing price")

# YTD
Fig.Energy.YTD<-Fig.Brent2 + Fig.WTI2 + Fig.NGAS2 +
  plot_layout(nrow=3)

Fig.Brent1+Fig.Brent2+Fig.WTI1+Fig.WTI2+Fig.NGAS1+Fig.NGAS2+
  plot_layout(nrow=3)

rm(ISEQ)
rm(ISEQ_July22)
rm(ISEQ_YTD)
rm(SNP)
rm(SNP_July22)
rm(SNP_YTD)

Ireland & The Euro Area

Euro Area Bonds

# Euro Area
EA.1YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_1Y")
EA.1YR$obstime<-convert_dates(EA.1YR$obstime)

Fig_EA.1YR<-ggplot(data=EA.1YR,aes(x=obstime,y=obsvalue,group=ref_area))+
  geom_line(colour="blue")+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.1YR, size = 3)+
  theme_bw()+
  theme(legend.position = "bottom")+
  ggtitle("1 Year Maturity")+
  ylab("yield (%)")+
  xlab(NULL)

EA.5YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_5Y")
EA.5YR$obstime<-convert_dates(EA.5YR$obstime)

Fig_EA.5YR<-ggplot(data=EA.5YR,aes(x=obstime,y=obsvalue,group=ref_area))+
  geom_line(colour="blue")+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.5YR, size = 3)+
  theme_bw()+
  theme(legend.position = "bottom")+
  ggtitle("5 Year Maturity")+
  ylab("yield (%)")+
  xlab(NULL)

EA.10YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_10Y")
EA.10YR$obstime<-convert_dates(EA.10YR$obstime)

Fig_EA.10YR<-ggplot(data=EA.10YR,aes(x=obstime,y=obsvalue,group=ref_area))+
  geom_line(colour="blue")+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.10YR, size = 3)+
  theme_bw()+
  theme(legend.position = "bottom")+
  ggtitle("10 Year Maturity")+
  ylab("yield (%)")+
  xlab(NULL)

EA.30YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_30Y")
EA.30YR$obstime<-convert_dates(EA.30YR$obstime)

Fig_EA.30YR<-ggplot(data=EA.30YR,aes(x=obstime,y=obsvalue,group=ref_area))+
  geom_line(colour="blue")+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.30YR, size = 3)+
  theme_bw()+
  theme(legend.position = "bottom")+
  ggtitle("30 Year Maturity")+
  ylab("yield (%)")+
  xlab(NULL)

Fig_EA.1YR+Fig_EA.5YR+Fig_EA.10YR+Fig_EA.30YR+
  plot_layout(nrow=2,ncol=2)

# Generate yield curve
EA.1YR_Print<-tail(EA.1YR,1)
EA.5YR_Print<-tail(EA.5YR,1)
EA.10YR_Print<-tail(EA.10YR,1)
EA.30YR_Print<-tail(EA.30YR,1)

EA.YieldCurve <- rbind(EA.1YR_Print,EA.5YR_Print,EA.10YR_Print,EA.30YR_Print)
EA.YieldCurve$year <- sub("\\Y.*","",EA.YieldCurve$data_type_fm)
EA.YieldCurve$year <- sub(".*SR_","",EA.YieldCurve$year)
EA.YieldCurve$year <- as.numeric(EA.YieldCurve$year)

Fig_EA.YieldCurve<-ggplot(data=EA.YieldCurve,aes(x=year,y=obsvalue,group=ref_area))+
  geom_line(colour="blue")+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text(label=round(EA.YieldCurve$obsvalue,digits=2),vjust=-1,hjust=1,colour="blue")+
  theme_bw()+
  theme(legend.position = "bottom")+
  ggtitle("Yield Curve")+
  ylab("yield (%)")+
  xlab(NULL)

Fig_EA.YieldCurve

The yield curve inverting is said to be a strong recession indicator.

I’ve taken the average position each month to see signs of the curve inverting year to date. Note the “short end”, the 1 year maturity rising and the “long end” falling. This is flattening, but has not inverted.

I’ve had difficulty extending this animation past year to date but I will try to get include for the full sample as soon as possible.

Euro Area GDP

Most trends are volatile these days, GDP no exception. See the large movements (in standard deviation and percentage terms), this does not make it easy to call recession/recovery dynamics. Policy makers hang on the data releases.

GDP_V <- get_data("MNA.Q.Y.I8.W2.S1.S1.B.B1GQ._Z._Z._Z.EUR.LR.GY")
GDP_V$obstime<-convert_dates(GDP_V$obstime)
GDP_V$lag <- Lag(GDP_V$obsvalue,1)
GDP_V$Diff <- GDP_V$obsvalue - GDP_V$lag
GDP_V$obsvalue <- round(GDP_V$obsvalue, digits=2)
GDP_V$Diff <- round(GDP_V$Diff, digits=2)
SD_GDP_V <- sd(GDP_V$Diff,na.rm = TRUE)
GDP_V_20 <- GDP_V %>%
  filter(obstime <="2019-12-31")
SD_GDP_V_20 <- sd(GDP_V_20$Diff,na.rm = TRUE)

Fig.GDP_V1 <- ggplot(data=GDP_V,aes(x=obstime, y=obsvalue,group=ref_area))+
  geom_line(aes(colour=ref_area))+
  geom_hline(yintercept = 0, linetype='dotted')+
  scale_color_manual(values=c("blue"))+
  geom_text_repel(aes(label=obsvalue),data = GDP_V, size = 3,max.overlaps = 8)+
  theme_bw()+
  theme(legend.position = "none")+
  ylab("%")+
  xlab(NULL)

Fig.GDP_V2 <- ggplot(data=GDP_V,aes(x=obstime, y=Diff,group=ref_area))+
  geom_col(aes(fill=ref_area),alpha=0.5)+
  scale_fill_manual(values=c("blue"))+
  geom_hline(yintercept = 0, linetype='dotted')+
  geom_text_repel(aes(label=round(Diff,digits=2)),data = GDP_V, size = 3)+
  theme_bw()+
  geom_hline(yintercept=SD_GDP_V,linetype='dashed',colour="blue")+
  geom_hline(yintercept=-SD_GDP_V,linetype='dashed',colour="blue")+
  geom_hline(yintercept=SD_GDP_V_20,linetype='dashed',colour="gray")+
  geom_hline(yintercept=-SD_GDP_V_20,linetype='dashed',colour="gray")+
  theme(legend.position = "none")+
  ylab("quarterly change percentage points")+
  xlab(NULL)+
  ggtitle("GDP volume growth (economic growth)")+
    labs(caption = "blue line = 1 SD, gray = 1 SD pre 2020")


Fig.GDP_V2 + Fig.GDP_V1 + plot_layout(nrow=2, heights = c(2,1))

Euro Area Monetary Aggregate

Nobel prize winner Milton Friedman (1912-2006). Friedman was an incredibly influential figure in economics, most notably or Monetarism. - The essence of this is that central banks should control the supply of money to effect inflation. Economics moved on from this idea but you will regularly hear commentators discuss central banks “printing too much money” as causing inflation.

This is intuitively the case but often misrepresented, where as developing countries may indeed increase the actual stock of notes to such a degree that they become worthless, is there any evidence that this is the case in Europe, for example?

This will not be an extensive assessment by any means but should give insight into the relationship between “money supply”, and inflation. - Or lack thereof. So what is money supply really?

The Monetary Base (M0)
also known as “M zero” is defined as the sum of currency in circulation and reserves held at the Central Bank.
M1
money supply includes only currency and checking deposits: Both can be used directly to pay for goods and services.
M2
equals M1 plus other assets such as savings deposits and money market mutual funds.
M3
is the sum of M3, repurchase agreements, money market fund shares/units and debt securities with a maturity of up to two years.

So what is the correlation between money supply and inflation?

### Monetary Aggregate
M3 <- get_data("BSI.M.U2.Y.V.M30.X.I.U2.2300.Z01.A")
M3$obstime<-convert_dates(M3$obstime)
M3$lag <- Lag(M3$obsvalue,1)
M3$Diff <- M3$obsvalue - M3$lag
M3$obsvalue <- round(M3$obsvalue, digits=2)
M3$Diff <- round(M3$Diff, digits=2)
SD_M3 <- sd(M3$Diff,na.rm = TRUE)
M3_20 <- M3 %>%
  filter(obstime <="2019-12-31")
SD_M3_20 <- sd(M3_20$Diff,na.rm = TRUE)

Fig.M3.1<-ggplot(data=M3,aes(x=obstime, y=obsvalue,group=ref_area))+
  geom_line(aes(colour=ref_area))+
  geom_hline(yintercept = 0, linetype='dotted')+
  scale_color_manual(values=c("blue"))+
  geom_text_repel(aes(label=obsvalue),data = M3, size = 3,max.overlaps = 8)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("M3 Growth - Euro Area")+
  ylab("% change")+
  xlab(NULL)

###### Load HICP to test correlation
HICP <- get_data("ICP.M.U2.N.000000.4.ANR")
HICP$obstime<-convert_dates(HICP$obstime)
HICP$lag <- Lag(HICP$obsvalue,1)
HICP$Diff <- HICP$obsvalue - HICP$lag
HICP$obsvalue <- round(HICP$obsvalue, digits=2)
HICP$Diff <- round(HICP$Diff, digits=2)
SD_HICP <- sd(HICP$Diff,na.rm = TRUE)
HICP_20 <- HICP %>%
  filter(obstime <="2019-12-31")
SD_HICP_20 <- sd(HICP_20$Diff,na.rm = TRUE)

###### Filter M3 to start from 01-01-1997 and join
M3.97 <- M3 %>%
  filter(obstime >="1997-01-01")
M3.97 <- M3.97 %>%
  rename(obsvalueM3 = obsvalue)%>%
  select(12:13)
HICP <- HICP %>% right_join(M3.97,by="obstime") 
rm(M3.97)

###### draw plots
Fig.M3_HICP.1<-ggplot(data=HICP)+
  geom_line(aes(obstime,obsvalue),colour="purple")+
  geom_line(aes(obstime,obsvalueM3),colour="blue")+
  theme_bw()+
  ggtitle("M3 Growth vs HICP")+
  labs(subtitle="from 1997")+
  ylab("%")+
  xlab(NULL)

Fig.M3_HICP.2<-ggplot(HICP,aes(x=obsvalue,y=obsvalueM3))+
  geom_point(alpha=0.5)+
  geom_smooth(method=lm,se=F, colour="gray")+
  theme_bw()+
  labs(subtitle="Correlation Plot")+
  ylab("M3 Growth (%)")+
  xlab("HICP (%)")

Fig.M3_HICP<-Fig.M3_HICP.1+Fig.M3_HICP.2+plot_layout(nrow=2)
Fig.M3.1 + Fig.M3_HICP + plot_layout(ncol=2,widths = c(2,1))

Cor.M3_HICP <- round(cor(HICP$obsvalue,HICP$obsvalueM3),digits=2)

The correlation between M3 and HICP in modern times is weak, with an r value of 0.18. An r value sub 0.5 is considered weak with a value sub 0.25 considered very weak.

#### M1
M1 <- get_data("BSI.M.U2.Y.V.M10.X.I.U2.2300.Z01.A")
M1$obstime<-convert_dates(M1$obstime)
M1$lag <- Lag(M1$obsvalue,1)
M1$Diff <- M1$obsvalue - M1$lag
M1$obsvalue <- round(M1$obsvalue, digits=2)
M1$Diff <- round(M1$Diff, digits=2)
SD_M1 <- sd(M1$Diff,na.rm = TRUE)
M1_20 <- M1 %>%
  filter(obstime <="2019-12-31")
SD_M1_20 <- sd(M1_20$Diff,na.rm = TRUE)

Fig.M1.1<-ggplot(data=M1,aes(x=obstime, y=obsvalue,group=ref_area))+
  geom_line(aes(colour=ref_area))+
  geom_hline(yintercept = 0, linetype='dotted')+
  scale_color_manual(values=c("blue"))+
  geom_text_repel(aes(label=obsvalue),data = M1, size = 3,max.overlaps = 8)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("M1 Growth - Euro Area")+
  ylab("% change")+
  xlab(NULL)

#### M2
M2 <- get_data("BSI.M.U2.Y.V.M20.X.I.U2.2300.Z01.A")
M2$obstime<-convert_dates(M2$obstime)
M2$lag <- Lag(M2$obsvalue,1)
M2$Diff <- M2$obsvalue - M2$lag
M2$obsvalue <- round(M2$obsvalue, digits=2)
M2$Diff <- round(M2$Diff, digits=2)
SD_M2 <- sd(M2$Diff,na.rm = TRUE)
M2_20 <- M2 %>%
  filter(obstime <="2019-12-31")
SD_M2_20 <- sd(M2_20$Diff,na.rm = TRUE)

Fig.M2.1<-ggplot(data=M2,aes(x=obstime, y=obsvalue,group=ref_area))+
  geom_line(aes(colour=ref_area))+
  geom_hline(yintercept = 0, linetype='dotted')+
  scale_color_manual(values=c("blue"))+
  geom_text_repel(aes(label=obsvalue),data = M2, size = 3,max.overlaps = 8)+
  theme_bw()+
  theme(legend.position = "none")+
  ggtitle("M2 Growth - Euro Area")+
  ylab("% change")+
  xlab(NULL)

Fig.MonAgg<-Fig.M1.1+Fig.M2.1+Fig.M2.1+plot_layout(nrow=3)

M1.97 <- M1 %>%
  filter(obstime >="1997-01-01")
M1.97 <- M1.97 %>%
  rename(obsvalueM1 = obsvalue)%>%
  select(12:13)
HICP <- HICP %>% right_join(M1.97,by="obstime") 
rm(M1.97)
M2.97 <- M2 %>%
  filter(obstime >="1997-01-01")
M2.97 <- M2.97 %>%
  rename(obsvalueM2 = obsvalue)%>%
  select(12:13)
HICP <- HICP %>% right_join(M2.97,by="obstime") 
rm(M2.97)

Fig.M2_HICP.2<-ggplot(HICP,aes(x=obsvalue,y=obsvalueM2))+
  geom_point(alpha=0.5)+
  geom_smooth(method=lm,se=F, colour="gray")+
  theme_bw()+
  labs(subtitle="Correlation Plot")+
  ylab("M2 Growth (%)")+
  xlab("HICP (%)")

Cor.M2_HICP <- round(cor(HICP$obsvalue,HICP$obsvalueM2),digits=2)

Fig.M1_HICP.2<-ggplot(HICP,aes(x=obsvalue,y=obsvalueM1))+
  geom_point(alpha=0.5)+
  geom_smooth(method=lm,se=F, colour="gray")+
  theme_bw()+
  labs(subtitle="Correlation Plot")+
  ylab("M1 Growth (%)")+
  xlab("HICP (%)")

Cor.M1_HICP <- round(cor(HICP$obsvalue,HICP$obsvalueM1),digits=2)

Fig.M1.1 + Fig.M1_HICP.2 + Fig.M2.1 + Fig.M2_HICP.2 + plot_layout(nrow=2)

#rm(M3,M3_20,HICP,HICP_20)
#rm(Fig.M3.1,Fig.M3_HICP,Fig.M3_HICP.1,Fig.M3_HICP.2)

In this sample M1 shows a negative relationship, which is exactly the opposite of what you would expect. Higher money supply leading to lower inflation. There is surely a lagged effect which I have not looked into among other things (Quantitative Easing & Tightening), but I wanted to convey this relationship is not as straight forward as you would assume.

The M1 r value is -0.36. The M2 r value is 0.14.

RTB Data

GEO_Merge_RIA02 <- readxl::read_xlsx(path="C:\\Users\\harte\\OneDrive\\Experimental\\Newsletter\\2022-08\\N2\\GEO_FILES.xlsx",sheet = 3)
GEO_Merge_RIA02$Location <- GEO_Merge_RIA02$Locations_RIA02 
RTB_Exclude <- readxl::read_xlsx(path="C:\\Users\\harte\\OneDrive\\Experimental\\Newsletter\\2022-08\\N2\\GEO_FILES.xlsx",sheet = 4)
shp <- sf::read_sf("C:\\Users\\harte\\OneDrive\\Experimental\\Newsletter\\2022-08\\N2\\Constituency_Boundaries_Ungeneralised___OSi_National_Electoral_Boundaries___2017.shp")

RIA02: RTB Average Monthly Rent Report

The series although being named “Monthly” in the database is averaged to years. There are 446 locations in the series, 383 locations will be used in this analysis due to the data including aggregated areas such as counties with granular level towns.

The latest data published for the RTB (RIA02) which includes 2021 data contained revisions to historical data.

RIA02 <- cso_get_data("RIA02")
RIA02 <- RIA02%>%
  pivot_longer(!1:4, names_to = "year")
RIA02 <- merge(GEO_Merge_RIA02, RIA02, by.x = "Location", by.y="Location")
RIA02 <- full_join(RIA02, RTB_Exclude, by = "Location")
# The first iteration to include All Bedrooms, All Property Types
RIA02.1 <- RIA02 %>%
  filter(Number.of.Bedrooms=="All bedrooms")%>%
  filter(Property.Type=="All property types")%>%
  filter(`Excluded (=0)`=="1")

# The second iteration to include [One bed, Two bed, Three bed, Four plus bed], All Property Types
RIA02.2 <- RIA02 %>%
  filter(Number.of.Bedrooms=="One bed"|Number.of.Bedrooms=="Two bed"|Number.of.Bedrooms=="Three bed"|Number.of.Bedrooms=="Four plus bed")%>%
  filter(Property.Type=="All property types") %>%
  filter(`Excluded (=0)`=="1")
  
# The third iteration to include [One bed, Two bed, Three bed, Four plus bed], [Detached house, Semi detached house, Terrace house, Apartment, Other flats]
RIA02.3 <- RIA02 %>%
  filter(Number.of.Bedrooms=="One bed"|Number.of.Bedrooms=="Two bed"|Number.of.Bedrooms=="Three bed"|Number.of.Bedrooms=="Four plus bed")%>%
  filter(Property.Type=="Detached house"|Property.Type=="Semi detached house"|Property.Type=="Terrace house"|Property.Type=="Apartment"|Property.Type=="Other flats") %>%
  filter(`Excluded (=0)`=="1")
# Filter to 2021
RIA02.1_21 <- RIA02.1 %>%
  filter(year=="2021")
RIA02.2_21 <- RIA02.2 %>%
  filter(year=="2021")

T_RIA02.1_21 <- RIA02.1_21 %>%
  group_by(Seat_Tag)%>%
  summarise(nr = n(),
            Avg = mean(value,na.rm=TRUE))
T_RIA02.2_21 <- RIA02.2_21 %>%
  group_by(Seat_Tag,Number.of.Bedrooms)%>%
  summarise(nr = n(),
            Avg = mean(value,na.rm=TRUE))

# Merge the above to map

shpRIA02.1_21<- merge(shp, T_RIA02.1_21, by.x = "CON_SEAT_", by.y="Seat_Tag")
  
T_RIA02.1_21_GDA <- RIA02.1_21 %>%
  group_by(Seat_Tag)%>%
  summarise(nr = n(),
            Avg = mean(value,na.rm=TRUE)) %>%
  filter(grepl('Dublin|Laoghaire|Meath|Louth|Kildare|Wicklow', Seat_Tag))
shpRIA02.1_21_GDA <- merge(shp, T_RIA02.1_21_GDA, by.x = "CON_SEAT_", by.y="Seat_Tag")
#Map
Map_ALL<-shpRIA02.1_21 %>%
  ggplot()+
  geom_sf(aes(fill = Avg))+
  scale_fill_stepsn(n.breaks = 10,
    colors=c("#0c233f","#FFFFFF","#b4862d"),
    limits = c(500,2250),
    name = "Rent")+
    ggtitle('RTB - CSO: RIA02')+
  labs(caption="2021: Locations aggregated to constituency")+
  theme_void()+
  theme(legend.title = element_text(size = 10),
        legend.text = element_text(size = 8))+
    theme(legend.position = "left")+
  theme(plot.title = element_text(hjust = 1))

Map_GDA<-shpRIA02.1_21_GDA %>%
  ggplot()+
  geom_sf(aes(fill = Avg))+
  scale_fill_stepsn(n.breaks = 10,
    colors=c("#0c233f","#FFFFFF","#b4862d"),
    limits = c(500,2250),
    name = "Rent")+
  theme_void()+
  theme(legend.title = element_text(size = 10),
        legend.text = element_text(size = 8))+
    theme(legend.position = "left")+
  theme(plot.title = element_text(hjust = 1))

Map_ALL+Map_GDA+ plot_layout(widths = c(2,1.5))

Energy

Back in May the CSO began to publish data on Data Centers Electricity consumption. See the IT article “Metered electricity consumption by data centers increased from 290 gigawatt hours in the period from January to March 2015 to 1,058 in October to December 2021.

A gigawatt of power is enough electricity to supply more than 500,000 homes.” - I’m not sure about the maths on the 500,000 homes. The US Department of Energy lay out the maths on a gigawatt equating to 9,090 Nissan Leafs or 100 Million LED bulbs.

How 1 Leaf could be worth 55 homes is beyond me… Regardless the trends below are often measures in gigawatt (GWH).

I suspect the CSO will update this again soon as the latest quarter to date has been from Q4 2021. I’ve included that data in this section, also I’ve included Gas consumption. - For obvious reasons.

Electricity Consumption

“Data centres use up a considerably higher share of electricity in the State than in other countries. A 2020 European Commission put average data centre usage in 2018 at 2.7 per cent of electricity demand, compared with 14 per cent in Ireland.” - From the previously linked article.

MEC02 <- cso_get_data("MEC02")
MEC02 <- MEC02 %>%
  pivot_longer(!1:2,names_to="year_qtr")
MEC02 <- MEC02 %>%
  filter(Electricity.Consumption!="All metered electricity consumption")
MEC02$Year_Q <- as.yearqtr(MEC02$year_qtr)
MEC02$Year <- year(MEC02$Year_Q)

MEC02.Res <- MEC02 %>%
  filter(Electricity.Consumption=="Data centres")
MEC02.Non <- MEC02 %>%
  filter(Electricity.Consumption=="Customers other than data centres")

ggplot(data=MEC02.Res,aes(x=Year_Q,y=value,group=1))+
  geom_line(colour="navy",size=2,alpha=0.7)+
  geom_line(data=MEC02.Non,aes(x=Year_Q,y=value,group=1),colour="#E1B020",size=2,alpha=0.7)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = MEC02.Res,size=3,max.overlaps = 2)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = MEC02.Non,size=3,max.overlaps = 3)+
  theme_bw()+
  ylab("Gigawatt Hours (GWH)")+
  labs(subtitle="Data Centres vs All Other Customers",caption = "navy line = data centres, orange line = all other")+
  ggtitle("Metered Electricity Consumption")

Gas Consumption

Residential gas consumption at peak season tends to be approximately 35% of Non-residential, which is less seasonal in trend.

MGC01 <- cso_get_data("MGC01")
MGC01 <- MGC01 %>%
  pivot_longer(!1:3,names_to="year_qtr")
MGC01$Year_Q <- as.yearqtr(MGC01$year_qtr)
MGC01$Year <- year(MGC01$Year_Q)
MGC01_State <- MGC01 %>%
  filter(Counties...Dublin.Postal.Districts=="All Counties and Dublin Postal Districts")

MGC01_State.Res <- MGC01_State %>%
  filter(Sector=="Residential")
MGC01_State.Non <- MGC01_State %>%
  filter(Sector=="Non-residential including power plants")

ggplot(data=MGC01_State.Res,aes(x=Year_Q,y=value,group=1))+
  geom_line(colour="#D50AD5",size=1.5,alpha=0.7)+
  geom_line(data=MGC01_State.Non,aes(x=Year_Q,y=value,group=1),colour="#0AD5C5",size=1.5,alpha=0.7)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = MGC01_State.Res,size=3,max.overlaps = 2)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = MGC01_State.Non,size=3,max.overlaps = 3)+
  theme_bw()+
  ylab("Gigawatt Hours (GWH)")+
  labs(subtitle="Residential vs Non-Residential",caption = "pink line = residential consumption, blue line = non-residential consumption")+
  ggtitle("Metered Gas Consumption")

Average Earnings

The public sector pay deal has been in the headlines of late. This section takes the latest data from the CSO for public sector workers and a high level of private sector workers.

# Public or Private Sector level
EHQ08 <- cso_get_data("EHQ08")
EHQ08 <- EHQ08 %>%
  filter(Statistic=="Average Weekly Earnings") %>%
  filter(Private.or.Public.Sector != "All sectors")
EHQ08 <- EHQ08 %>%
  pivot_longer(!1:2,names_to = "year_qtr")

EHQ08$Year_Q <- as.yearqtr(EHQ08$year_qtr)
EHQ08$Year <- year(EHQ08$Year_Q)

ggplot(EHQ08,aes(x=Year_Q,y=value,group=Private.or.Public.Sector,colour=Private.or.Public.Sector))+
  geom_line(size=1.5,alpha=0.5)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = EHQ08,size=3,max.overlaps = 5,colour="black")+
  theme_bw()+
  ggtitle("Average Weekly Earnings - EHQ08")+
  theme(legend.position = "bottom")+
  scale_colour_manual(values=c("#999999", "#E69F00"),
                      name="Sector")+
  ylab("euro")

Public Sector

# Public Sectors
EHQ10 <- cso_get_data("EHQ10")
EHQ10 <- EHQ10 %>%
  filter(Statistic=="Average Weekly Earnings") %>%
  filter(Sub.Sector != "Total Public Sector including Semi State bodies")%>%
  filter(Sub.Sector != "Total Public Sector excluding Semi State bodies")
EHQ10 <- EHQ10 %>%
  pivot_longer(!1:2,names_to = "year_qtr")

EHQ10$Year_Q <- as.yearqtr(EHQ10$year_qtr)
EHQ10$Year <- year(EHQ10$Year_Q)

EHQ10$SMAvalue <- SMA(EHQ10$value,n=4) ###### need to SMA by group!!!!!!!!
# try below to remove first 3 quarters

EHQ10$SMAvalue[EHQ10$year_qtr=="2008Q1" | EHQ10$year_qtr=="2008Q2" | EHQ10$year_qtr=="2008Q3"] <- NA

EHQ08.Pub <- EHQ08 %>%
  filter(Private.or.Public.Sector == "Public sector")

Fig.Public.Sec.Pay<- ggplot(EHQ10,aes(x=Year_Q,y=value,group=Sub.Sector,colour=Sub.Sector))+
  geom_line(data=EHQ08.Pub,aes(x=Year_Q,y=value,group=1),colour="#9D9E9E",linetype="dashed",alpha=0.75)+
  geom_line(data=EHQ10,aes(x=Year_Q,y=SMAvalue,group=1),colour="#9D9E9E",linetype="solid",alpha=0.75)+
  geom_line(alpha=0.5,size=1)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = EHQ10,size=2.5,max.overlaps = 6,colour="black")+
  theme_bw()+
  ggtitle("Public Sector: Average Weekly Earnings - EHQ10")+
  theme(legend.position = "none")+
  ylab("euro")

Fig.Public.Sec.Pay + facet_wrap(~Sub.Sector) +
  labs(caption="dotted line = average weekly earnings for public sector (EHQ08), solid line = simple moving average, t = 4")

Private Sector

The EHQ13 data set aggregates NACE sectors into 4 broad groups, one includes public servants so it will be excluded. The remainder, one of which is an aggregation, will be viewed separately with the three “Types” of employees faceted for each.

Industry

Sectors: B to E

# All
EHQ13 <- cso_get_data("EHQ13")
EHQ13 <- EHQ13 %>%
  pivot_longer(!1:3,names_to = "year_qtr")
EHQ13$Year_Q <- as.yearqtr(EHQ13$year_qtr)
EHQ13$Year <- year(EHQ13$Year_Q)

# Industry
EHQ13.1 <- EHQ13 %>%
  filter(Economic.Sector.NACE.Rev.2 == "Industry (B to E)")


EHQ13.1$SMAvalue <- SMA(EHQ13.1$value,n=4) 
EHQ13.1$SMAvalue[EHQ13.1$year_qtr=="2010Q1" | EHQ13.1$year_qtr=="2010Q2" | EHQ13.1$year_qtr=="2010Q3"| EHQ13.1$year_qtr=="2010Q4"] <- NA

EHQ08.Pri <- EHQ08 %>%
  filter(Private.or.Public.Sector == "Private sector")

Fig.Private.Sec.Pay.1<- ggplot(EHQ13.1,aes(x=Year_Q,y=value,group=Type.of.Employee,colour=Type.of.Employee))+
  geom_line(data=EHQ08.Pri,aes(x=Year_Q,y=value,group=1),colour="#9D9E9E",linetype="dashed",alpha=0.75)+
  geom_line(data=EHQ13.1,aes(x=Year_Q,y=SMAvalue,group=1),colour="#9D9E9E",linetype="solid",alpha=0.75)+
  geom_line(alpha=0.5,size=1)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = EHQ13.1,size=2.5,max.overlaps = 12,colour="black")+
  theme_bw()+
  ggtitle("Private Sector - Industry: Average Earnings - EHQ13")+
  theme(legend.position = "bottom")+
  ylab("euro")+guides(color=guide_legend(nrow=4, byrow=TRUE))

Fig.Private.Sec.Pay.1 + facet_wrap(~Type.of.Employee) + 
  theme(
  strip.background = element_blank(),
  strip.text.x = element_blank())+
  labs(caption="dotted line = average weekly earnings for private sector (EHQ08), solid line = simple moving average, t = 4")

Business and services

Sectors: B to N,R,S

EHQ13.2 <- EHQ13 %>%
   filter(Economic.Sector.NACE.Rev.2 == "Business and services (B to N,R,S)")
 
 EHQ13.2$SMAvalue <- SMA(EHQ13.2$value,n=4) 
 EHQ13.2$SMAvalue[EHQ13.2$year_qtr=="2010Q1" | EHQ13.2$year_qtr=="2010Q2" | EHQ13.2$year_qtr=="2010Q3"| EHQ13.2$year_qtr=="2010Q4"] <- NA
 

 Fig.Private.Sec.Pay.1<- ggplot(EHQ13.2,aes(x=Year_Q,y=value,group=Type.of.Employee,colour=Type.of.Employee))+
   geom_line(data=EHQ08.Pri,aes(x=Year_Q,y=value,group=1),colour="#9D9E9E",linetype="dashed",alpha=0.75)+
   geom_line(data=EHQ13.2,aes(x=Year_Q,y=SMAvalue,group=1),colour="#9D9E9E",linetype="solid",alpha=0.75)+
   geom_line(alpha=0.5,size=1)+
   geom_text_repel(aes(x=Year_Q,y=value,label=value),data = EHQ13.2,size=2.5,max.overlaps = 12,colour="black")+
   theme_bw()+
   ggtitle("Private Sector - Business & Services: Average Earnings - EHQ13")+
   theme(legend.position = "bottom")+
   ylab("euro")+guides(color=guide_legend(nrow=4, byrow=TRUE))
 
 Fig.Private.Sec.Pay.1 + facet_wrap(~Type.of.Employee) + 
   theme(
   strip.background = element_blank(),
   strip.text.x = element_blank())+
   labs(caption="dotted line = average weekly earnings for private sector (EHQ08), solid line = simple moving average, t = 4")

All excluding activities

Sectors: A,T and U (B to S)

# All
EHQ13.3 <- EHQ13 %>%
  filter(Economic.Sector.NACE.Rev.2 == "All NACE economic sectors excluding activities A,T and U (B to S)")


EHQ13.3$SMAvalue <- SMA(EHQ13.3$value,n=4) 
EHQ13.3$SMAvalue[EHQ13.3$year_qtr=="2010Q1" | EHQ13.3$year_qtr=="2010Q2" | EHQ13.3$year_qtr=="2010Q3"| EHQ13.3$year_qtr=="2010Q4"] <- NA

Fig.Private.Sec.Pay.1<- ggplot(EHQ13.3,aes(x=Year_Q,y=value,group=Type.of.Employee,colour=Type.of.Employee))+
  geom_line(data=EHQ08.Pri,aes(x=Year_Q,y=value,group=1),colour="#9D9E9E",linetype="dashed",alpha=0.75)+
  geom_line(data=EHQ13.3,aes(x=Year_Q,y=SMAvalue,group=1),colour="#9D9E9E",linetype="solid",alpha=0.75)+
  geom_line(alpha=0.5,size=1)+
  geom_text_repel(aes(x=Year_Q,y=value,label=value),data = EHQ13.3,size=2.5,max.overlaps = 12,colour="black")+
  theme_bw()+
  ggtitle("Private Sector - All Sectors: Average Earnings - EHQ13")+
  theme(legend.position = "bottom")+
  ylab("euro")+guides(color=guide_legend(nrow=4, byrow=TRUE))

Fig.Private.Sec.Pay.1 + facet_wrap(~Type.of.Employee) + 
  theme(
  strip.background = element_blank(),
  strip.text.x = element_blank())+
  labs(caption="dotted line = average weekly earnings for private sector (EHQ08), solid line = simple moving average, t = 4")

Unemployment

Unemployment at low levels will likely do little to mitigate inflation. Admitting it is to some degree desirable to increase is politically unpalatable, but an increase in unemployment is probable over the next 6 months.

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_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 = 3,colour="black",max.overlaps = 5)+
  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))

Retail Sales

I will be keenly watching these indices for signs of the downturn.

RSM05 <- cso_get_data("RSM05")
RSM05 <- RSM05 %>%
  pivot_longer(!1:2, names_to = "year_month")

# Date transformation
## Take adjusted index only

RSM05 <- RSM05%>%filter(Statistic=="Retail Sales Index Value Adjusted"|Statistic=="Retail Sales Index Volume Adjusted")

RSM05$Month <- as.Date(paste(RSM05$year_month, "01", sep = "-"), "%YM%m-%d")
RSM05$Year <- year(RSM05$Month)
RSM05$Lag <- Lag(RSM05$value,1)
RSM05$Diff <- RSM05$value-RSM05$Lag

RSM05_A <- RSM05%>%
  filter(NACE.Group=="All retail businesses")

RSM05_B <- RSM05%>%
  filter(NACE.Group=="Motor trades (45)"|NACE.Group=="Retail sale in non-specialised stores with food, beverages or tobacco predominating (4711)"|NACE.Group=="Department stores (4719)"|NACE.Group=="Retail sale of automotive fuel (4730)"|NACE.Group=="Retail sale of hardware, paints and glass (4752)"|NACE.Group=="Retail sale of furniture and lighting (4759)"|NACE.Group=="Bars (5630)")

# RSI
## Full Sample
RSM05_A1 <- RSM05_A%>%filter(Statistic=="Retail Sales Index Value Adjusted")
RSM05_A2 <- RSM05_A%>%filter(Statistic=="Retail Sales Index Volume Adjusted")

Fig.RSM.1<-ggplot(data=RSM05_A1,aes(x=Month,y=value))+
  geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#4aa98a")+
  geom_hline(aes(yintercept=100), 
             colour= "#404040",
             linetype = 1)+
  theme_bw()+
  geom_text_repel(aes(label=value),data = RSM05_A1, size = 3,colour="black",max.overlaps = 7)+
  labs(title = "RSI Value (Adjusted) - RSM05", subtitle = "2015 to Date")+
  xlab("Year-Month")+
  ylab("RSI (Base Dec 2015=100)")+
  theme(panel.border = element_rect(linetype = 1, fill = NA))

Fig.RSM.2<-ggplot(data=RSM05_A2,aes(x=Month,y=value))+
  geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#a55a94")+
  geom_hline(aes(yintercept=100), 
             colour= "#404040",
             linetype = 1)+
  theme_bw()+
  geom_text_repel(aes(label=value),data = RSM05_A2, size = 3,colour="black",max.overlaps = 7)+
  labs(title = "RSI Volume (Adjusted) - RSM05", subtitle = "2015 to Date")+
  xlab("Year-Month")+
  ylab(NULL)+
  theme(panel.border = element_rect(linetype = 1, fill = NA))

#Fig.RSM.1 + Fig.RSM.2 + plot_layout(ncol=2)

## YTD
Fig.RSM.3<-ggplot(data=subset(RSM05_A1,Year >= "2022"),aes(x=Month,y=value))+
  geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#4aa98a")+
  geom_text_repel(aes(label=value),data=subset(RSM05_A1,Year >= "2022"), size = 3,colour="black",max.overlaps = 7)+
  theme_bw()+
  labs(subtitle = "YTD")+
  xlab(NULL)+
  ylab(NULL)+
  theme(panel.border = element_rect(linetype = 1, fill = NA))

Fig.RSM.4<-ggplot(data=subset(RSM05_A2,Year >= "2022"),aes(x=Month,y=value))+
  geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#a55a94")+
  theme_bw()+
  geom_text_repel(aes(label=value),data=subset(RSM05_A2,Year >= "2022"), size = 3,colour="black",max.overlaps = 7)+
  labs(subtitle = "YTD")+
  xlab(NULL)+
  ylab(NULL)+
  theme(panel.border = element_rect(linetype = 1, fill = NA))


Fig.RSM.1 + Fig.RSM.2 + Fig.RSM.3 + Fig.RSM.4 + plot_layout(nrow = 2,heights = c(2,1.5))

RSM05_B1 <- RSM05_B%>%filter(Statistic=="Retail Sales Index Value Adjusted")
RSM05_B2 <- RSM05_B%>%filter(Statistic=="Retail Sales Index Volume Adjusted")

FigNACE<-ggplot(data=subset(RSM05_B1,Year >= "2022"), aes(x=Month, y=value, group=NACE.Group, colour=NACE.Group))+
  geom_line(aes(group=NACE.Group),size = 1.05, linetype=1, alpha = 0.65)+
  labs(title = "RSI Value by NACE Group")+
  xlab("Year-Month")+
  ylab("2015 = 100")+
  geom_hline(aes(yintercept=100), 
             colour= "#404040",
             linetype = 1)+
  theme_bw()+
  geom_text_repel(aes(label=value),data=subset(RSM05_B1,Year >= "2022"),size=3,colour="black",max.overlaps = 10)+
    scale_x_date(date_labels="%b-%Y",date_breaks  ="1 month")+
  theme(axis.text.x = element_text(angle=90))+
  theme(axis.text.x=element_text(size=10))+
  theme(legend.position="none")+
  theme(axis.text = element_text(size = rel(1)))+
  theme(plot.title=(element_text(vjust =2)))+
  theme(panel.border = element_rect(linetype = 1, fill = NA))

Fig.RSM.5<-FigNACE + facet_wrap(~NACE.Group, ncol = 1)

FigNACE2<-ggplot(data=subset(RSM05_B2,Year >= "2022"), aes(x=Month, y=value, group=NACE.Group, colour=NACE.Group))+
  geom_line(aes(group=NACE.Group),size = 1.05, linetype=1, alpha = 0.65)+
  labs(title = "RSI Volume by NACE Group")+
  xlab("Year-Month")+
  ylab("2015 = 100")+
  geom_hline(aes(yintercept=100), 
             colour= "#404040",
             linetype = 1)+
  theme_bw()+
  geom_text_repel(aes(label=value),data=subset(RSM05_B2,Year >= "2022"),size=3,colour="black",max.overlaps = 10)+
    scale_x_date(date_labels="%b-%Y",date_breaks  ="1 month")+
  theme(axis.text.x = element_text(angle=90))+
  theme(axis.text.x=element_text(size=10))+
  theme(legend.position="none")+
  theme(axis.text = element_text(size = rel(1)))+
  theme(plot.title=(element_text(vjust =2)))+
  theme(panel.border = element_rect(linetype = 1, fill = NA))

Fig.RSM.6<-FigNACE2 + facet_wrap(~NACE.Group, ncol = 1)

Fig.RSM.5+Fig.RSM.6