Tuesday, June 3, 2014

Changing off diagonal elements in a Covariance Matrix

If you try to change one off-diagonal element of a positive definite covariance matrix, you may find that the adjusted matrix is no longer positive definite. When one element is changed, others often need to be adjusted too, but how do we do this?

Here's a suggestion that was originally developed for looking at exchange rate ( FX ) covariance matrices:

Let \(x^b_a\) be the cost of 1 unit of currency 'b' quoted in currency 'a'.

So we have the standard FX relations:
\[x^a_b=\frac{1}{x^b_a}\] and
\[x^a_b={x^a_c} {x^c_b}\] We will start with a simple model without drift and zero interest rates. Suppose we have a stochastic model:
\[\frac{dx^a_b}{x^a_b}=\sigma^a_b dw^a_b\] with
\[\mathbb{E}(dw^a_b)=0\] and
\[\mathbb{E}\left((dw^a_b)^2\right)=dt \]
Suppose we have a base currency (numeraire) 'a', then we can write: \[\sigma^{bc}_a=E\left(\frac{dx^b_a}{x^b_a} \frac{dx^c_a}{x^c_a}\right)\frac{1}{dt}\]
eqn (i)
The diagonal of the covariance is the vol squared: \[\sigma^{bb}_a=(\sigma^b_a)^2\]
If we change the numeraire, then what’s the effect on the covariance?
To work it out we start by considering: \[\frac{dx^c_d}{x^c_d}=\frac{x^d_a}{x^c_a}d\left(\frac{x^c_a}{x^d_a}\right)=\frac{dx^c_a}{x^c_a}-\frac{dx^d_a}{x^d_a}+\Lambda\] Using Ito’s lemma we find that \(\Lambda\) only contains terms that are either higher order or are non-stochastic, but when we are looking at the covariance, all of \(\Lambda\) can be ignored. And so: \[\sigma^{bc}_d=\mathbb{E}\left(\frac{dx^b_d}{x^b_d} \frac{dx^c_d}{x^c_d}\right)\frac{1}{dt}=\mathbb{E}\left(\left(\frac{dx^b_a}{x^b_a}-\frac{dx^d_a}{x^d_a}\right)\left(\frac{dx^c_a}{x^c_a}-\frac{dx^d_a}{x^d_a}\right)\right)\frac{1}{dt}\]
eqn (ii)
Now using eqn (i) we find: \[\sigma^{bc}_d=\sigma^{bc}_a-\sigma^{bd}_a-\sigma^{cd}_a+\sigma^{dd}_a\]
eqn (iii)

This is our change of numeraire formula.

One little exercise that may be worth trying is to check that if we change the numeraire from ‘a’ to ‘d’ and then back again that we do indeed recover the original value. i.e. what you need to do is to get the four terms on the RHS of (iii) and change their numeraire to ‘d’. You’ll then have sixteen terms. After doing lots of cancellation and noting that some of the terms are identically zero you’ll recover the original covariance, i.e. LHS of (iii)

For a given numeraire ( base currency ) say ‘a’ we have a covariance matrix over the indices ‘b’ and ‘c’: \(\sigma^{bc}_a\)
Very often when working with covariance matrices, it can be very helpful if it is positive definite.
Suppose we have a covariance matrix which we have estimated from historical returns and now we want to change one element. Perhaps we have some good implied vol data on that FX pair. It can be problematic changing one element in the covariance matrix since it is very easy to lose the positive-definite attribute. If you change one element then there should be a ripple effect on neighbouring elements.
But how do we evaluate that ripple effect?

We for a start we could break up the covariance matrix into a set of vols and correlations: \[\sigma^{bc}_a=\sigma^b_a\sigma^c_a\rho^{bc}_a\] If we adjust the vol ( to some non-zero value) while leaving the correlation alone, then the PD attribute will be preserved. Note the the diagonal elements of the covariance are just the vols squared.

So, if we want to change an off diagonal element what we do is change the numeraire, so that that element comes onto the diagonal.
We then split up new covariance matrix into vols and correlation.
We update the vol, leaving the correlation fixed, reform the covariance matrix and then return to the original numeraire.

The question for the reader is when ( if ever ) will the above process not preserve the PD attribute?

No comments: