Introduction

Question: When Germany’s stock market goes up or down, does the UK’s stock market tend to move in the same direction?

  • I will compare the DAX index in Germany with the FTSE index in the United Kingdom.
  • I will use R’s built-in EuStockMarkets dataset, which also includes Switzerland’s SMI and France’s CAC.
  • The data covers 1991–1998, with 1,860 observations.

Since the data is historical, I will only be making statements on the trends observed for that time period. The statistics explored may not reflect the current market situation.

What is a daily return?

Index levels are measured on different scales, so we compare the percentage change from one observation to the next.

\[ \text{Daily Return}_t = \frac{P_t-P_{t-1}}{P_{t-1}}\times 100\% \]

Here, \(P_t\) is the index value today and \(P_{t-1}\) is its value at the previous observation.

  • A positive return means the index increased.
  • A negative return means the index decreased.

Measuring the relationship

Pearson’s correlation, \(r\), describes the direction and strength of a linear relationship between two variables.

\[ r = \frac{\sum (x_i-\bar{x})(y_i-\bar{y})} {\sqrt{\sum (x_i-\bar{x})^2\sum (y_i-\bar{y})^2}} \]

  • A value near 1 means a strong positive linear relationship.
  • A value near 0 means little linear relationship.
  • A value near −1 means a strong negative linear relationship.

Note: Correlation does not imply Causation.

The regression model

I fit a straight line to describe how the two sets of daily returns relate:

\[ \text{FTSE Return} = \beta_0 + \beta_1(\text{DAX Return}) + \epsilon \]

  • The slope \(\beta_1\) estimates the average change in FTSE return associated with a one percentage-point change in DAX return.
  • R-squared describes the share of variation in FTSE returns explained by this model.

This simple model summarizes the data; it does not predict every daily movement.

The R code

This is the main code used to calculate returns, correlation, and the regression model.

# Calculate daily percentage returns
returns <- data.frame(
  DAX = 100 * (stock$DAX[-1] / stock$DAX[-nrow(stock)] - 1),
  FTSE = 100 * (stock$FTSE[-1] / stock$FTSE[-nrow(stock)] - 1)
)

# Measure the relationship
cor(returns$DAX, returns$FTSE)
model <- lm(FTSE ~ DAX, data = returns)
summary(model)

Visualization 1: index growth over time

Each market is set to 100 at the first observation so their relative changes can be compared on one chart.

What it shows: The lines show how the index values changed relative to where each one started. This chart shows overall growth, rather than whether the markets moved together on individual days.

Visualization 2: DAX and FTSE daily returns

Each point represents one observation. The line shows the fitted linear relationship.

What it shows: If the points generally rise from left to right, higher DAX returns tend to be associated with higher FTSE returns. The spread of points shows that the relationship is not exact.

What did the model find?

Using the historical observations:

  • Correlation: 0.638
  • Regression slope: 0.494
  • R-squared: 0.407 (about 40.7% of the variation in FTSE returns)

The correlation summarizes how closely the daily returns move in a linear pattern. The slope estimates the average change in FTSE return associated with a one percentage-point change in DAX return. R-squared shows how much of the variation is captured by this straight-line model.

Interactive chart: three markets

The 3D chart lets us explore three markets at once.

Conclusion

  • Correlation: The correlation between German DAX and UK FTSE daily returns was 0.64, showing a positive relationship between the two markets.

  • Regression: A one-percentage-point increase in DAX returns was associated with an average change of 0.49 percentage points in FTSE returns.

  • Model fit: The \(R^2\) value was 0.41, meaning DAX returns explained about 40.7% of the variation in FTSE returns.

Main finding: German and UK stock markets tended to move in the same direction during 1991–1998. However, the relationship was not perfect, and changes in the German market alone could not explain all daily movements in the UK market.

Data source: EuStockMarkets dataset included in R.