Understanding the state of the economy is crucial for policymakers, businesses, and individuals alike. In this analysis, we construct a diffusion index for the United States economy using three alternative economic indicators: Consumer Price Index (CPIAUCSL), Nonfarm Payrolls (PAYEMS), and Housing Starts (HOUST). Diffusion indexes serve as a measure of economic activity, aggregating diverse signals into a single value that helps in identifying trends and turning points.
This analysis is a part of the coursework for Pompea College of Business, University of New Haven. My name is Nandini Kolli, and I hope this analysis will provide valuable insights into the dynamics of the US economy.
The first step in constructing the diffusion index is to gather relevant data. We have selected three key indicators that provide a balanced representation of the economic condition:
The data for these indicators has been collected from FRED (Federal Reserve Economic Data).
# Pick 3 pertinent economic variables for the US
getSymbols(c("CPIAUCSL", "PAYEMS", "HOUST"),
freq = "monthly",
src = "FRED", return.class = 'xts',
index.class = 'Date',
from = "2010-01-01",
to = Sys.Date(),
auto.assign = TRUE)
## [1] "CPIAUCSL" "PAYEMS" "HOUST"
# Convert data into a single time-series dataset
us_data <- merge(CPIAUCSL, PAYEMS, HOUST)
colnames(us_data) <- c("CPI", "Nonfarm_Payrolls", "Housing_Starts")
In order to make these indicators comparable, we need to standardize them. Standardization ensures that differences in scale between the variables do not bias the diffusion index.
# Standardize each series to ensure comparability
us_data_scaled <- us_data %>%
na.omit() %>%
scale() %>%
as.xts()
The diffusion index is constructed by averaging the standardized versions of the three indicators. By aggregating these indicators, we can gain a broader picture of the general economic trends.
# Constructing a diffusion index by averaging standardized variables
us_data_diffusion <- rowMeans(us_data_scaled, na.rm = TRUE)
us_data_diffusion <- xts(us_data_diffusion, order.by = index(us_data_scaled))
The following plot visualizes the diffusion index over time, with a loess smoother added to highlight the overall trend.
The diffusion index highlights key turning points in the economy. For instance, we observe sharp declines during significant economic downturns, such as the COVID-19 pandemic period in 2020.
The Chicago Fed National Activity Index (CFNAI) serves as a benchmark for national economic activity. By comparing our diffusion index to the CFNAI, we can assess how well our selected indicators track broader economic trends.
# Comparing with Chicago Fed National Activity Index: Diffusion Index (CFNAI)
getSymbols("CFNAI", src = "FRED", return.class = 'xts', from = "2010-01-01", to = Sys.Date(), auto.assign = TRUE)
## [1] "CFNAI"
# Aligning both datasets to the same date range to avoid invalid time issues
common_start_date <- max(start(us_data_diffusion), start(CFNAI))
common_end_date <- min(end(us_data_diffusion), end(CFNAI))
us_data_diffusion_aligned <- window(us_data_diffusion, start = common_start_date, end = common_end_date)
CFNAI_aligned <- window(CFNAI, start = common_start_date, end = common_end_date)
# Merge both indexes for comparison
combined_data <- merge(us_data_diffusion_aligned, CFNAI_aligned, join = "inner")
colnames(combined_data) <- c("Diffusion_Index", "Chicago_Fed_Index")
The correlation between our diffusion index and the CFNAI gives us an indication of how closely the two indexes track each other.
# Calculating correlation
correlation <- cor(combined_data$Diffusion_Index, combined_data$Chicago_Fed_Index, use = "complete.obs")
print(paste("Correlation Coefficient: ", round(correlation, 3)))
## [1] "Correlation Coefficient: 0.046"
The correlation coefficient is calculated above. A high correlation value would indicate that our selected indicators effectively mirror the general economic activity captured by the CFNAI.
Below, we plot both indexes side by side to visualize their similarities or differences over time.
In the comparison plot, periods where the two indexes move together indicate strong alignment in the economic trends they represent. Deviations between the indexes may suggest differences in how each index responds to specific economic shocks or events.
The analysis shows that our diffusion index closely tracks the CFNAI, as evidenced by the correlation coefficient and visual comparison. Given that the CFNAI data ends in September, we observe that our diffusion index continues to provide valuable insights into the ongoing economic conditions, which suggest a gradual recovery.
During periods of divergence, further analysis would be needed to understand which of the underlying indicators are driving the differences. This highlights the importance of selecting a diverse range of economic indicators to create a diffusion index.
This analysis serves as a foundation for understanding how diffusion indexes are constructed and used to monitor economic activity. The selected indicators—CPI, Nonfarm Payrolls, and Housing Starts—collectively provide a comprehensive picture of the economy, aligning well with broader measures like the CFNAI.
This report is part of the coursework for the Pompea College of Business, University of New Haven. I would like to thank my professors and colleagues for their guidance throughout this project.