Extrapolate the US Unemployment Rate

The quantmod library can download data from St. Louis Fed database FRED so we can use it to get the US unemployment rate.

We will assume the rate over a short period follows an exponential decay falling to a long-term rate of 4%.

We can use nls() to fit our data.

Then we can create an extrapolated time axis so that we can plot the data and the extrapolated curve. If we think the Fed will hike when the unemployment rate hits, say, 5% then we can calculate time when the extrapolated unemployment rate hits 5%.

Here’s the code to plot the extrapolation.

And this is what it looks like.