Recently I’ve been putting my y-axis labels on the right for some time series.
I think this idea has been rattling around in my head since it was suggested on Twitter by Maarten Lambrechts:
A y-axis on the left is almost always the default, while the most recent and usually most relevant data are on the right. Then shouldn't a y-axis on the right be the default (when there are no data labels), to improve legibility?
Yesterday I shared with you observations on the economy, which form the core of many of my recent economic outlook talks. In that article I used some charts with alternative formatting. No not spooky, but a blue theme kind of like those alternative road uniforms some sportsball teams wear.
Here, I will share with you the R code for these delicious plots.
Setup
First we’ll need to set up our chart theme, tweak some ggplot2 defaults and load some libraries.
We are entering the homestretch for 2020, with just about two months left. It has been an intense year, with many twists and turns. Given all the uncertainty many people have been asking me to share my perspective on the outlook for US housing and mortgage markets. I’ve given many talks, in this article I’m laying out the basic view that forms the core of my recent presentations.
The COVID-19 pandemic and the associated recession are of course the dominant drivers of the outlook.
Today the FHFA released their house price index for August 2020. Per the report house prices in August 2020 increased 1.5 percentage points over the prior month (19.6% at an annualized rate). Over the last 12-months US house prices have increased 8%, and over the last 3-months they have risen over 15% on an annualized basis. That is an acceleration of over 7.5 percentage points, the largest turnaround in house price growth since the inflection point in 2009.
Earlier today I tweeted out an update of our skyline mortgage rate chart. Gray Kimbrough (follow him on Twitter to get all your Millennial Myths busted) pointed out that my chart style was close to famous art style of Joy Division’s 1979 album Unknown Pleasures.
That was exactly right, because I arrived at the skyline mortgage rate chart by tweaking my original application of ‘ggridges::geom_density_ridges’ (formerly known as Joyplot) code to arrive there.
Let’s update our earlier analysis to examine the Federal Reserve’s Beige Book.
Following my earlier post, we can construct a sentiment measure for each report. It turns out that after turning sharply negative in spring, the October 2020 report returned to positive territory.
The sentiment index looks at all words and after adjusting for economics terms (like gross) we score them for sentiment. We could just count up the number of times we see words like “stong” vs words like “weak”.
About a year ago I made a chart and Bob Rudis dubbed it a skyline chart. Here’s an updated version I made today.
The chart shows a historgram over US weekly average 30-year mortgage rates by year broken into 1/8 percentage points buckets. We see that through this past week, 30-year mortgage rates had spend eight weeks around 2.875 percent.
R code
The R script below will generate it (using my darklyplot package’s theme_dark2 function).
Every week I track a lot of data. One useful source is the Mortgage Bankers Association Weekly Applications Survey. This survey provides a timely, high frequency (weekly) reading on the U.S. mortgage market. Most weeks I make a bunch of charts related to the release, often posting them on Twitter:
Here's how I've been interpreting the hot recent housing market data. Still a lot of catch up from a lost spring.
I’ve been thinking about distributional forecasts. In particular I’ve been considering Quantile Autoregressions (QAR) as defined in KOENKER AND XIAO 2006. There are some handy lecture notes I’ll borrow from at this link (pdf) in the exercise here.
This is all speculative, but I think this might be a useful way to think about the assymetry in likely outcomes given the uncertainty inherent in today’s economic forecasts.
Setup
Let’s define the QAR(1) model for quantile \(Q(\tau)\),
Been a while since I blogged here. Where does time go? On Twitter, I realized it’s just about time for spooky plots:
U.S. existing home sales hit a seasonally adjusted annual rate of 6 million in August 2020, first time at 6 million since 2006 pic.twitter.com/4ZKrO2d0zN
— 📈 Len Kiefer 📊 (@lenkiefer) September 22, 2020 Maybe too early?
In this post, I want to share a simple R code pattern that’s been useful for me.