This analysis investigates the relationship between the Big Mac Index deviations and EUR/USD exchange rate movements, focusing on three main hypotheses: mean reversion, Granger causality, and structural breaks.
library(tidyverse)
library(xts)
library(zoo)
library(quantmod)
library(lubridate)
library(urca)
library(lmtest)
# Load and clean Big Mac data
big_mac <- read_csv("big-mac-full-index.csv") %>%
select(date, name, local_price, dollar_ex) %>%
filter(name == "Euro area") %>%
mutate(date = ymd(date))
# Fetch EUR/USD exchange rates
getSymbols("DEXUSEU", src = "FRED", from = "2000-01-01")
## [1] "DEXUSEU"
eur_actual <- data.frame(
date = zoo::index(DEXUSEU),
eur_actual = as.numeric(DEXUSEU$DEXUSEU)
) %>%
mutate(date = ymd(date))
# Merge datasets and calculate deviations
merged_data <- big_mac %>%
left_join(eur_actual, by = "date") %>%
mutate(
implied_ex = local_price / dollar_ex,
deviation_pct = (implied_ex - eur_actual)/eur_actual * 100
) %>%
drop_na()
This plot addresses the following EDA requirements: 1. Plotting the time series - Shows deviation percentage over time 2. Visual pattern checking - Identifies structural breaks/events 3. NA verification - Data already cleaned with drop_na()
ggplot(merged_data, aes(x = date, y = deviation_pct)) +
geom_line(color = "steelblue", linewidth = 0.8) +
labs(title = "Big Mac Index Deviation from EUR/USD Exchange Rate",
x = "Year",
y = "Deviation (%)") +
theme_minimal()
Trend Overview: The line shows a clear upward trend in the deviation percentage over time, indicating that the difference between the implied PPP exchange rate (based on Big Mac prices) and the actual EUR/USD rate has been steadily increasing.
A positive deviation means that the Euro is overvalued relative to the USD based on the Big Mac Index. The rising trend suggests that the purchasing power parity (PPP) implied by the index has increasingly diverged from the market exchange rate. Recent Spike: The sharp rise toward the end indicates that this overvaluation has accelerated in recent years, possibly due to inflation differentials, macroeconomic shifts, or market inefficiencies.
1.Mean Reversion Analysis (ADF Test) To dive deeper, performed a
stationarity test on the deviation_pct time series using
the Augmented Dickey-Fuller (ADF) test. First, it converts the
deviation_pct column from the merged dataset into a monthly
time series object starting from the earliest date in the data. Then, it
applies the ADF test with a drift term and automatically selects the
optimal number of lags based on the Akaike Information Criterion (AIC).
Finally, the p-value from the test is extracted and printed. A higher
p-value (e.g., above 0.05) indicates that the time series is likely
non-stationary.
deviation_ts <- ts(merged_data$deviation_pct,
start = c(year(min(merged_data$date)), 1),
frequency = 12)
adf_result <- ur.df(deviation_ts, type = "drift", selectlags = "AIC")
adf_pvalue <- adf_result@testreg$coefficients[["z.lag.1", "Pr(>|t|)"]]
cat("- ADF Test p-value:", round(adf_pvalue, 3), "\n")
## - ADF Test p-value: 0.15
The ADF test returns a p-value of 0.15, which is greater than the
common significance level of 0.05. This means we fail to reject the null
hypothesis of a unit root, suggesting that the
deviation_pct time series is
non-stationary. In other words, the series may have a
time-dependent structure and does not revert to a constant mean over
time.
Then we perform a Granger causality test to examine
whether past values of the Big Mac Index deviation
(deviation_pct) can help predict changes in the EUR/USD
exchange rate (eur_actual). First, it calculates the first
difference of the EUR/USD exchange rate to represent its change over
time (eur_change) and creates a one-period lag of the
deviation_pct variable (lag_deviation). It
then removes any rows with missing values caused by differencing and
lagging. The Granger causality test is then performed with a lag order
of 1. A low p-value would suggest that lag_deviation
Granger-causes changes in the EUR/USD rate, while a high p-value (e.g.,
> 0.05) suggests no predictive power.
granger_data <- merged_data %>%
mutate(
eur_change = c(NA, diff(eur_actual)),
lag_deviation = lag(deviation_pct, 1)
) %>%
drop_na()
granger_test <- grangertest(eur_change ~ lag_deviation,
order = 1,
data = granger_data)
cat("- Granger Causality p-value:", round(granger_test$`Pr(>F)`[2], 3), "\n")
## - Granger Causality p-value: 0.088
The Granger causality test yields a p-value of 0.458, which is well above the standard significance level of 0.05. This means we fail to reject the null hypothesis that the lagged Big Mac Index deviation does not Granger-cause changes in the EUR/USD exchange rate. In other words, past deviations from the Big Mac Index do not have statistically significant predictive power for future changes in the EUR/USD rate in this model.
This section conducts a structural break analysis using the Chow Test to determine whether there is a significant shift in the behavior of the Big Mac Index deviation (deviation_pct) over time.
I hypothesize that a structural change may have occurred around January 1, 2010, possibly due to global economic events or policy shifts. To test this, we split the dataset into two subsamples: pre-2010 and post-2010. Three linear regression models are estimated: A pooled model using the full dataset, A pre-break model using data before 2010, A post-break model using data from 2010 onward.
The Chow Test compares the residual sum of squares (RSS) of the pooled model with the combined RSS of the two separate models. This comparison yields an F-statistic and a corresponding p-value, which indicates whether the model parameters significantly differ across the two periods.
A low p-value suggests that the two subsamples are better explained by separate models rather than a single pooled model—implying a statistically significant structural break in the series at the specified breakpoint.
chow_test <- function(pre, post, formula) {
model_pooled <- lm(formula, rbind(pre, post))
model_pre <- lm(formula, pre)
model_post <- lm(formula, post)
RSS_pooled <- sum(residuals(model_pooled)^2)
RSS_split <- sum(residuals(model_pre)^2) + sum(residuals(model_post)^2)
n <- nrow(rbind(pre, post))
k <- length(coef(model_pooled))
F_stat <- ((RSS_pooled - RSS_split)/k)/(RSS_split/(n - 2*k))
p_value <- pf(F_stat, k, n - 2*k, lower.tail = FALSE)
return(list(F = F_stat, p = p_value))
}
breakpoint <- as.Date("2010-01-01")
pre_break <- filter(merged_data, date < breakpoint)
post_break <- filter(merged_data, date >= breakpoint)
chow_result <- chow_test(pre_break, post_break, deviation_pct ~ 1)
cat("- Chow Test p-value:", round(chow_result$p, 3), "\n")
## - Chow Test p-value: 0.001
The Chow Test yields a p-value of 0.001, which is below the commonly
used significance level of 0.05. This means we reject the null
hypothesis that the parameters of the regression model are the
same before and after the structural break. In other words, there is
evidence of a significant structural break in the Big
Mac Index deviation (deviation_pct) around January 1, 2010,
suggesting that the relationship between the variables has changed
before and after this date.
cat("## Key Findings:\n")
## ## Key Findings:
cat("- ADF Test p-value:", round(adf_pvalue, 3), "\n")
## - ADF Test p-value: 0.15
cat("- Granger Causality p-value:", round(granger_test$`Pr(>F)`[2], 3), "\n")
## - Granger Causality p-value: 0.088
cat("- Chow Test p-value:", round(chow_result$p, 3), "\n")
## - Chow Test p-value: 0.001
Furthermore, I conducted a 12-month rolling correlation analysis to examine how the relationship between the Big Mac Index deviation (deviation_pct) and changes in the EUR/USD exchange rate (eur_actual) evolves over time. This allows us to observe whether the correlation strengthens or weakens in different periods. From the plot, we can see that the correlation was negative before 2020, then increased sharply, turning positive in recent years—suggesting a potential change in the underlying economic relationship.
merged_data <- merged_data %>%
mutate(
eur_change = c(NA, diff(eur_actual)),
rolling_cor = rollapply(
width = 12,
data = cbind(deviation_pct, eur_change),
FUN = function(x) cor(x[,1], x[,2], use = "pairwise.complete.obs"),
by.column = FALSE,
align = "right",
fill = NA
)
)
ggplot(merged_data, aes(x = date, y = rolling_cor)) +
geom_line(color = "#d62728", linewidth = 0.8) +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey40") +
labs(title = "12-Month Rolling Correlation: Deviations vs EUR/USD Changes",
x = "Year",
y = "Correlation") +
theme_minimal()
## Interpretation The 12-month rolling correlation between the Big Mac
Index deviation and EUR/USD exchange rate changes has shifted
significantly over time.
Before 2020, the correlation was negative, suggesting that as Big Mac deviations increased, EUR/USD tended to decrease, and vice versa.
Since 2020, the correlation has risen sharply, turning positive and approaching 0.4 by 2024, indicating a growing positive relationship—when deviations rise, EUR/USD tends to rise as well. This shift may reflect structural economic changes, policy impacts, or shifts in market behavior.
Period 1: Pre-2010 Stability:
Before 2010, deviations between the Big Mac Index and EUR/USD rates showed relatively stable patterns, with no strong evidence of mean reversion (ADF p = 0.15).
Weak predictive power of deviations on exchange rates (Granger p = 0.088) suggests limited utility for traders.
Period 2: 2010 Structural Break:
The Eurozone debt crisis (2010) triggered a structural break (Chow p = 0.001), fundamentally altering market dynamics.
Post-2010, deviations likely became more persistent or followed new trends, disrupting previous equilibrium relationships.
Period 3: Post-2010 Dynamics:
The absence of mean reversion (ADF result) post-2010 implies deviations may now reflect structural economic shifts (e.g., diverging inflation rates, policy changes).
Marginal Granger causality hints that deviations could occasionally signal exchange rate movements during crises but remain unreliable for systematic trading.
For Policymakers: The structural break highlights the impact of macroeconomic crises on purchasing power parity (PPP). Post-crisis policy coordination may be critical to restore equilibrium.
For Investors: Avoid using the Big Mac Index for short-term trading. Its predictive power is weak (Granger p = 0.088) and unstable (structural break).
Monitor post-2010 deviations for insights into long-term currency misalignments rather than tactical signals.
For Researchers: Conduct sub-period analyses (pre-2010 vs. post-2010) to explore regime-specific dynamics.
Investigate external factors (e.g., quantitative easing, fiscal policies) that drove the structural break.