Testing Whether a Commodity–Exchange Rate Relationship Changes Over Time
Summary
The document asks whether the relationship between crude oil price changes and Colombian exchange rate changes differs across time periods. Its proposed approach is to add a period indicator and interact it with the oil variable in a regression, which would allow the estimated slope to vary between periods. The accepted response offers a simpler alternative: calculate Pearson correlations within each year to assess changes in linear association, or use Spearman correlations when rank-based or sign-related dependence is of interest.
The response recommends checking whether each correlation is statistically significant before comparing its size. It provides no calculations or empirical results, and it does not directly evaluate the proposed regression interaction. Yearly correlations can summarize changing association, but they do not by themselves establish a changing causal effect; results may also depend on the chosen time window and sample size.
Key ideas
- A period indicator interacted with an explanatory variable can represent period-specific regression slopes.
- Pearson correlation summarizes linear association, while Spearman correlation summarizes rank-based association.
- Correlations can be computed separately for each year to inspect how association evolves.
- Assess the statistical significance of correlations before comparing their magnitudes.
- Correlation changes alone do not establish that the explanatory variable caused a changing effect.
Tags
Full text
# How to check if relationship between two variable changes over time? # How to check if relationship between two variable changes over time? I am working on a commodity-exchange rate model as part of my thesis. My dependent variable is log of first difference of exchange rate of Colombia and my independent variable is log of first difference of crude petroleum price. I have daily data for last 20 years for both the variable. I am interested in looking whether the relationship (i.e. the effect of crude petroleum prices on Colombia's exchange rate) between the two variables changes over time. So let say i want to check whether effect of crude petroleum prices on Colombia's exchange rate in the last 5 years ( 2012-2017) is different from that in 2007-2012. I was thinking of creating dummy variables for 5 years ( 1 if the data is from 2012-2017, 0 otherwise) and then creating an interaction variable of the dummy and crude petroleum prices. I am not sure whether this is the right thing to do. also can i use any other model or test for the same. Any advice is appreciated. Please let me know if my question is unclear. I can try to modify it. Thanks in advance. ## Answer by Eldioo (score 2, accepted) https://quant.stackexchange.com/a/33251 One way is to check their (linear) dependency with Pearson's correlation coefficient. If you rather want to check for sign dependency, you can use Spearman's correlation coefficient. You could for example take the yearly data, calculate the correlation coefficient between the two data sets for every year and then check, whether the coefficient changed substantially. Before comparing the values, I would firstly test for their significance, though, to test whether there is any dependency to speak of.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.