Modelling CAC 40 stock prices’ weekly returns with a multivariate Student distribution
By: Gil-Arnaud Coche
Tags: Stochastic Modelling, Financial Economics, Fun, Statistics, Quantitative Finance

In this blog post, I want to explore the fit of the model given on page 153 of Financial Risk and Derivatives Pricing by Jean-Philippe Bouchaud and Marc Potters, with two additonal twists.

First, I want to consider that the stocks’ returns are not drift-less and second, I want the volatility factor of the original model to be a stochastic process with memory to account for volatility clusterings.

The Data

Before getting into the details of the moel, I’ll quickly present the data.

I manually downloaded daily data from Januray 1st, 2010 to December 31st, 2020 on the website below.

I resampled the data with a weelky frequency as initial results showed that the statistical properties of stocks at on the daily scale required further refinements.

Below is an example with the LVMH stock price. The top graphic shows the weekly prices and while the bottom graphic shows the weekly log-returns and the centered 3-day rolling volatility (bottom graphics — blue for the returns and red for the volatility).

Hermès international’s stock price for the past eleven years (top) with the log-returns and their 3-day centered rolling standard deviation (bottom — log-returns in blue, volatility in red)

There are 40 stocks in the pool however, by keeping only the stock with the most available data, only 39 stocks remain.

The model

As already meantionned in introduction, this model considers a multivariate non-centered distribution with volatility memory or volatility clustering. If you can, have a glance at page 153 of Bouchaud et al.’s to have a little bit of context. However, it is of course not necessary as I will give a thorough description below.

To account for the volatility clustering memory, one of the parameters from the original model is replaced by a stochastic process. Let’s have a look.

Considering ηᵢ(t), the log-return at time t of stock i, and keeping the general framework of Bouchaud et al.’s, we assume the following dynamic

where

mᵢ is the average log-return, and

f(t)tilde-ηᵢ(t) (with a tilde on ηᵢ like above, but I cannot write it on medium) is a noise term with the volatility factor f(t) and tilde-ηᵢ(t) is a centered gaussian variable.

In Bouchaud et al.’s model, f(t) is a constant equal to the square root of µ/s with s a gamma distributed variable, making of f an inverted-gamma distributed variable.

Our model will consider f(t) as a stochastic process with an exponentially decaying autocorrelation of parameter γ. Following De Souza et al. suggested (see arxiv link below this equation), such processes can be described by a stochastic differential equation for the square value of f(t) — assuming µ > 2.

Stocks’ cross-correlations are modelled by imposing non-zero covariance coefficients between noise terms tilde-ηᵢ(t) and tilde-ηⱼ(t). Such coefficients tilde-Cᵢⱼ are related to the true covariance matrix of the returns through the formula

Despite the added complexity of the stochastic process, the log-returns have the same distribution as in the original model where f(t) is a constant. This is because the process f²(t) independant from the processes tilde-ηᵢ(t).

So, just as explained in the book, we have

Fitting the data — let the fun begins

There are about 40 averages mᵢ, 820 terms in the covariance matrix C and the two terms γ and µ. So quite a few parameters need to be computed and we need to have a simple yet precise methodology.

First we will extract from the data the value of γ Second, we will extract the values of mᵢ’s, of Cᵢᵢ’s — diagonal terms of the covariance matrix, and of µ by fitting univariate distributions on each stock’s empirical density. Third, we will estimate the Cᵢⱼ’s — non-diagonal terms of covariance matrix, by fitting bivariate student distributions to all unique pairs of stock returns’ empirical densities.

The first objective is done in the next section while the second and third objectives are executed in the second section.

Fitting a correlation function

For the simplicity off the implementation, we will not be computing the true autocorrelation function but the proxy

where the sum is performed over all M=40 stocks. From the statistical nature of the elements in the definition of the log-returns, we can assert that

which is sufficient to extract the value of γ. Fitting the curve we find that γ=0.043/weeks and so a typical time decay for volatility clusters is about 20 weeks (see figure below).

Fitting of the autocorrelation proxy. The exponential decay misses the first values.

As shown above, the fit is good, but not perfect. As will be mentionned in the wrapping up section, a better fit can be obtained with a power-law decay.

Fitting the distributions

Trying to fit the multivariate distribution above to some multivariate empirical density that we would have computed is hopeless as such task is quickly cursed by dimensionality.

Example: If for one stock we consider a fit to be a good one if we compute 30 points of the empirical distribution, for forty stocks we need to have 30⁴⁰ points which approximatively amounts to 1e+60. It would be a nightmare to compute and a nightmare to fit, if at all possible.

Instead we will use the stability of the ηᵢ(t)’s distribution as the univariate and bivariate distributions are also following a student law. We can thus astutely derive the appropriate parameters using the following procedure.

Estimating the Cᵢᵢ’s — diagonal terms of the covariance matrix, and µ by fitting the univariate student distribution below to all stocks’ returns’ empirical distribution. Estimating the Cᵢⱼ’s — non diagonal terms of the covariance matrix, by fitting the bivariate student distribution below to all pairs of stocks’ returns’ empirical distribution.

Univariate student distribution

Bivariate Student distribution

By fitting the univariate distribution, we get fits like this one (Hermès International) which are pretty convincing, right?

The blue dots are the empirical density of the log-returns and the red line is the fitted univariate student distribution.

And as for the bivariate fitting, we can get results like that one (Hermès International and Kering). This is pretty convinving too, right?

In absissa, I used Hermes’ log-returns and in ordinate, I used Kering’s log-returns. The blue zones show the empirical density of points.

Insights on the bivariate figure: The darker an area is, the higher is the point density value. In red are the isolines of the bivariate student fit: as we get closer to the center, the higher of the density gets.

Why this is a good fit: The angle of the isolines seems to match the angle of the empirical density and the maximum isoline is not too far from the observed density maximum.

In order to convince ourselves further that the obtained values for the cross-covariances are in line with what we would expect intuitively from the companies, we can plot the maximum spanning tree of the correlation matrix(see page 160 of Bouchaud et al.) which gives indications on the strongest correlations between stocks.

Once more these results are in line with what we could expect: Peugeot (French car manufacturer) is correlated with Renault (another car manufacturer), Thalès, Safran and Airbus (aerospace manufacturers) on the bottom left seem to have strong connections to each others or even BNP-Paribas, Société Générale and Crédit Agricole (French bank groups) clearly show tight correlations on the top right.

Of course there are also some things which may seem counter-intuitive, like the strong apparent correlation between LVMH and Michelin. The latter, which produces tires ought to be rather correlated to Peugeot and Renaut…

The overall results are summarized in the table below.

Wrapping Up

This model is simple yet captures essential aspects of stocks’ dynamics in the CAC 40.

Here are some ideas of improvements.

i. The model is valid on the weekly scale and pre-studies showed that on a daily scale, log-returns’s µ is valued at around 1.30 making the stochastic differential equation completely inadequate (negative reverting mean). Further work should improve the dynamics of volatility for smaller values of µ.

ii. The exponential fit can be improved with a power-law fit as the figure below clearly shows top is the exponential fit while the bottom is the power-law fit. This would mean that we would have to find the way to simulate multivariate inverse-Gamma distributed variables with a power-law correlation.

Exponential fit

Power law fit

iii. One last improvement is to calibrate the coefficients of the Cholesky matrix instead of the covariance matrix. This would ensure that the covariance matrix found is always (semi) definite positive.