Economic Policy Uncertainty data made easy in R

Lingbing Feng


Economic Policy Uncertainty data

get_epu() function collects the EPU data and outputs an xts object. The required argument is region which is a character indicating the region of EPU data you need. By default, it collects all regions.

The data collection is in real time and normally takes about several seconds to download.

all_data <- get_EPU()

As it is a xts object, so dygraph can be directly applied for interactive plots.


If you need EPU for a specific region, use region = argument:

china_epu <- get_EPU(region = "China")

Another way to get country level data is to directly manipulate the all_data object:

china_data <- all_data$China

The difference is that using region will take care of the NA values so there is no large white area in the plot. However, it is not a problem in xts, just delete the NAs.


Trade Policy Uncertainty (TPU) data

The US TPU data is one of the category-specific EPU indices developed in the original paper by Baker et al. (2016). “It reflects the frequency of articles in American newspapers that discuss policy-related economic uncertainty and also contain one or more references to trade policy”. To get the US TPU data:

us_tpu <- get_TPU(region = "US")

China TPU index is constructed by Steven J. Davis, Dingqian Liu and Xuguang S. Sheng using the Renmin Daily and the Guangming Daily.

To get the China TPU:

china_tpu <- get_TPU("China")

Japan TPU is also available, to get Japan TPU:

jap_tpu <- get_TPU("Japan")

The japan TPU data also contains EPU, FPU, MPUI, and ERPU. If you need TPU, simply: