Can the FED Control Inflation and Maintain Full Employment?

The Federal Reserve’s mandate from Congress is to control inflation and to maintain low unemployment. These seem to be contradictory objectives.

For this story, the following data needs to be sourced for the last 25 years;

Data Visualizations should be designed to answer the question: “Has the FED been able to fulfill the mandate given to it by Congress?

Load Dependencies

# core packages from tidyverse without ggplot2
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
library(tidyr)
## Warning: package 'tidyr' was built under R version 4.2.3
library(readr)
library(purrr)
library(tibble)
library(stringr)
## Warning: package 'stringr' was built under R version 4.2.3
library(forcats)
library(lubridate)

# data sourcing API packages 
library(fredr)
library(httr)

Data Preparation

Federal Fund Rate

Federal Fund Rate is the target interest rate range set by the Federal Open Market Committee

# pull federal fund rate through the API
fredr_set_key(fred_api_key)

fund_raw_data <- fredr(series_id = "FEDFUNDS",
                        observation_start = as.Date("1999-01-01"),
                        observation_end = as.Date("2024-01-01"))

# monthly fund rate data for past 25 years
fund_rate_data <- fund_raw_data %>%
  select(-c(series_id, realtime_start, realtime_end)) %>%
  rename('fund_rate_value' = 'value')

fund_rate_data
## # A tibble: 301 × 2
##    date       fund_rate_value
##    <date>               <dbl>
##  1 1999-01-01            4.63
##  2 1999-02-01            4.76
##  3 1999-03-01            4.81
##  4 1999-04-01            4.74
##  5 1999-05-01            4.74
##  6 1999-06-01            4.76
##  7 1999-07-01            4.99
##  8 1999-08-01            5.07
##  9 1999-09-01            5.22
## 10 1999-10-01            5.2 
## # ℹ 291 more rows

Unemployment Rate

Unemployment Rate is the percentage of unemployed people in the workforce.

unemployment_raw_data <- fredr(series_id = "UNRATE",
                        observation_start = as.Date("1999-01-01"),
                        observation_end = as.Date("2024-01-01"))

unemployment_data <- unemployment_raw_data %>%
  select(-c(series_id, realtime_start, realtime_end)) %>%
  rename('unemployment_rate_value' = 'value')

unemployment_data
## # A tibble: 301 × 2
##    date       unemployment_rate_value
##    <date>                       <dbl>
##  1 1999-01-01                     4.3
##  2 1999-02-01                     4.4
##  3 1999-03-01                     4.2
##  4 1999-04-01                     4.3
##  5 1999-05-01                     4.2
##  6 1999-06-01                     4.3
##  7 1999-07-01                     4.3
##  8 1999-08-01                     4.2
##  9 1999-09-01                     4.2
## 10 1999-10-01                     4.1
## # ℹ 291 more rows

Consumer Price Index

Consumer Price Index is a measure of the the average change over time in the price and is one of the popular tool to determine the measure of inflation.

cpi_raw_data <- fredr(series_id = "CPIAUCSL",
                        observation_start = as.Date("1999-01-01"),
                        observation_end = as.Date("2024-01-01"))

cpi_data <- cpi_raw_data %>%
  select(-c(series_id, realtime_start, realtime_end)) %>%
  mutate(value = as.integer(unlist(cpi_raw_data$value))) %>%
  rename('cpi_value' = 'value')
  
cpi_data
## # A tibble: 301 × 2
##    date       cpi_value
##    <date>         <int>
##  1 1999-01-01       164
##  2 1999-02-01       164
##  3 1999-03-01       164
##  4 1999-04-01       165
##  5 1999-05-01       166
##  6 1999-06-01       166
##  7 1999-07-01       166
##  8 1999-08-01       167
##  9 1999-09-01       167
## 10 1999-10-01       168
## # ℹ 291 more rows

Data Wrangling

# merge 3 data
overall_data <- fund_rate_data %>%
  left_join(cpi_data, by = 'date') %>%
  left_join(., unemployment_data, by = 'date') %>%
  mutate(year = as.character(year(ymd(date))),
         monthly_inflation_estimate = round(((cpi_value - lag(cpi_value))/lag(cpi_value))*100, digits = 2)) %>%
  as.data.frame()

# annual data analysis
cpi_data_analysis <- overall_data %>%
  group_by(year) %>%
  summarise_at(vars(cpi_value), list(average_cpi = mean)) %>%
  mutate(annual_inflation_estimate = round(((average_cpi - lag(average_cpi))/lag(average_cpi))*100, digits = 2))
  
fed_rate_analysis <- overall_data %>%
  group_by(year) %>%
  summarise_at(vars(fund_rate_value), list(average_fund_rate = mean))

unemployment_rate_analysis <- overall_data %>%
  group_by(year) %>%
  summarise_at(vars(unemployment_rate_value), list(average_unemployment_rate = mean))

annual_data <- cpi_data_analysis %>%
  left_join(fed_rate_analysis, by = 'year') %>%
  left_join(unemployment_rate_analysis, by = 'year')
  
annual_data
## # A tibble: 26 × 5
##    year  average_cpi annual_inflation_estimate average_fund_rate
##    <chr>       <dbl>                     <dbl>             <dbl>
##  1 1999         166.                     NA                 4.97
##  2 2000         172.                      3.41              6.24
##  3 2001         177.                      2.86              3.89
##  4 2002         179.                      1.56              1.67
##  5 2003         184.                      2.28              1.13
##  6 2004         188.                      2.68              1.35
##  7 2005         195.                      3.41              3.21
##  8 2006         201                       3.17              4.96
##  9 2007         207.                      2.9               5.02
## 10 2008         215.                      3.83              1.93
## # ℹ 16 more rows
## # ℹ 1 more variable: average_unemployment_rate <dbl>

Overall Analysis and Data Visualizations

Based on historical data, it appears to shows that Federal Reserve has been able to fulfill the mandate given by the Congress to a certain extent. The dual mandate is to promote maximum employment and stable prices. The federal fund rate is one of many tools that Federal Reserve uses to help promote maximum employment and stabilize prices. By decreasing the federal fund rate or keeping it low, it will boost the borrowing power for business to potentially hire more employees and for consumer to spend on to stimulate the economy. By increasing the federal fund rate, it will reduce the borrowing power for business, forcing them to cut back on operating costs. It will encourage consumers to spend less (lowering consumer price index) and save more, cooling down the economy and lowering inflation.

The first graph shows that with low federal fund rates, the unemployment rates dropped in the spans of 25 years especially from 2009 to 2016, fulfilling the mandate of maximizing employment as much as possible. The second graph shows how with increased federal fund rate, the inflation rate dropped and reducing prices on consumer goods, fulfilling one of the mandates.

# base R line plot
plot(overall_data$date, overall_data$fund_rate_value, type = "n", ylim = c(0, 15),
     xlab = "Years", ylab = "Percent", main = "Federal Fund and Unemployment Rate Change Over Time")
lines(overall_data$date, overall_data$fund_rate_value, type = "l", lwd = 2, col = "blue")
lines(overall_data$date, overall_data$unemployment_rate_value, type = "l", lwd =2, col = "green")
lines(overall_data$date, overall_data$monthly_inflation_estimate, type = "l", lwd =2, col = "orange")

legend("topleft", legend = c("Fund Rate", "Unemployment Rate", "Monthly Inflation"),
       col = c("blue", "green", "orange"), lty = 1, bty = "n")

# base R line graph
plot(annual_data$year, annual_data$average_fund_rate, type = "n", ylim = c(0, 10),
     xlab = "Years", ylab = "Percent", main = "Annual Average Federal Fund and Inflation Rate Change")
lines(annual_data$year, annual_data$average_fund_rate, type = "l", lwd = 2, col = "blue")
lines(annual_data$year, annual_data$annual_inflation_estimate, type = "l", lwd = 2, col = "orange")

legend("topleft", legend = c('Fund Rate', 'Annual Inflation'), 
       col = c('blue', 'orange'), lty = 1, bty = "n")