Showing posts with label correlation. Show all posts
Showing posts with label correlation. Show all posts

Tuesday, 8 October 2019

Covariance

If  $X$ and $Y$ are random variables then their covariance is the expected value of the product of their deviations from their means.  Or in mathematical form, $\sigma_{X,Y}=E[(X-E[X]) (Y-E[Y])]$.  There's a lot of juice in this idea, a lot. But interpreting it can be hard, since the value's meaning depends heavily on the units of $X$ and $Y$.  For example of $X$ and $Y$ are return streams, if you represent the returns as percentages, e.g. 4%, 3.5%, etc versus representing them as unit fractions, e.g. 0.04, 0.035, etc, then the covariance of one would be 10,000 times larger than the covariance of the other.

You can see that the variance is in fact just the self-covariance.  That is $\sigma_X^2 = \sigma_{XX} = E[{(X-E[X])}^2]$.  So going back to the covariance between two random variables, the largest possible value for the covariance of $X$ and $Y$ is going to be when $Y$ moves exactly like $X$, is in fact $X$.  

A useful way to normalise covariance was presented by Auguste Bravais, an idea which Pearson championed.  In it, the units of covariance are normalised away by  the product of the standard deviations of the variables.  The resulting measure, normalised covariance, which ranges from -1 to +1 had become better known as the Pearson correlation coefficient, or simply the correlation, or COVAR() in excel.  $\rho_{X,Y} = \frac{\sigma_{X,Y}}{\sigma_X \sigma_Y}$.  This is easier for humans to read, comprehend and for various covariances from different contexts to be compared and ranked.  But if you are building a square variance-covariance matrix, you now know it is just a covariance matrix.  Furthermore, if you square this normalised covariance, you arrive at the familiar $R^2$ measure, the coefficient of determination, which is also equal to the proportion of the variance explained by the model, as a fraction of the total dependent variable variance, being $\frac{\sigma_{\hat{Y}}^2}{\sigma_{Y}^2}$.

If $X$ is the return stream of an equity, and $Y$ is the return of the market, then by dividing the covariance by the variance of the market return, $\sigma_Y^2$, we end up with the familiar beta of the stock, $\beta_X = \frac{\sigma_{X,Y}}{\sigma_Y^2}$.  Notice how similar this is to the so-called Pearson correlation coefficient.  In fact $\beta_X = \rho_{X,Y} \times \frac{\sigma_X}{\sigma_Y}$.  That is to say, when you scale the correlation of the security returns to the market by a scaling factor of the security returns volatility per unit of market returns volatility, you get the beta.  Beta as correlation times volatility ratio, that makes sense for a beta.

Finally, 3 rules: 
  1. if $Y =V+W$ then $\sigma_{X,Y} = \sigma_{X,V} + \sigma_{X,W}$
  2. if $Y =b$ then $\sigma_{X,Y} =0$
  3. if $Y=bZ$ then $\sigma_{X,Y} = b \times \sigma_{X,Z}$ 
And of course it is on the basis of rule (1) that Sharpe makes the development from Markowitz.

Sunday, 30 September 2018

returns, volatility of returns, correlation of returns

If all investment occurred via a single product, with a single pattern of returns, and no choice, and if this happened over a sufficiently long period that the short term swings of volatility become secondary when measured against the timeline of a typical investor's expected life, then the only one fact you can survive with is the (long term) expected return of that product.  I refer to it as a product and not an asset because I imagine it to be the offering of a company or set of companies which may have the freedom to manufacture this product.  

But reality isn't like that.  And as soon as a second product emerges as a choice (or even if you examine how the company manufactures this product), then correlation and (therefore volatility) enter into the frame.  

In the history of major assets, cash was invented first.  (Of course, loans existed before all that, and were a huge part of early human culture - the loans being loans of non-cash valuables for non-cash rewards e.g. slaves, food; these goods, like cash, may also have been understood to be fungible and tradeable).  Not surprisingly, the place which brought us writing also brought us the first bond.  The city state of Nippur in Sumeria offered one.  Italian city states pioneered state bonds as far back as the twelfth century, quite a while before the official story that Amsterdam and then the Bank of England invented them.  Certainly they set the modern pattern.   Shares were known certainly in Roman times, as was property, which had deep underpinnings as the earliest Greek and Roman religions were domestic hearth ancestor religions.  This simultaneously raised the cultural value of property but also introduced a whole bunch of restrictions, rules, taboos around selling property.  As the Roman republic evolved, and as class war between patricians and plebs loosened the grip of the old domestic gods, property as an asset class began to evolve too.

Inflation, of course, is not an asset.  But it is the force which makes cash experience volatility in real terms.  So these are the primary financial assets:  Cash (and loans), Property, Equities, Bonds.  And inflationary pressures contribute to the volatility of all four of these assets.  The primordial question is to work out how much each one will return to you, and how uncertain that return could be, and finally, to design of set of weightings which might exploit their time-evolving correlations.

By the time Markowitz came to develop the standard maths of modern portfolio theory, he addressed just two assets, equities and bonds.  Why?

Sunday, 16 September 2018

The anti-FOMO movement

There are n strategies, each with returns $r_i$.  Ranked top to bottom, so $r_1$ is the strategy with the highest return (long term).  Why not just put your wealth all in strategy 1?  Putting only a fraction of it in 1 and fractions in 2,3,...n leaves one with a feeling of missing out.  I suspect if you live to be 640, then this would be the effective result of the ideal allocation strategy.  Indeed if you have a 60 year perspective, this might also be the case.  But history doesn't always repeat itself.  So you can never be sure the future will continue sufficiently to be like the past.  Hence you'll want to diversify.  For example if you are Russian, living at the turn of the twentieth century and happened to note in 1901 that the St Petersburg stock exchange was your $r_1$, and decided to put all your wealth in there, then you'd be in for a shock when the Russian revolution came and wiped your wealth to zero.  If you were an ultra risk-adverse German post WW1 and thought you'd keep your money in nice liquid deutsche-marks, then the hyper-inflation would have likewise wiped you to effectively zero.
The degree to which you trust the institutions which underpin the strategy returns you feel you have access to is the degree to which larger and larger fractions of your wealth will go into strategies 1, 2 etc. rather than into tail end strategies.  Conversely, the degree to which you are uncertain of the future of those enabling institutions (and this, to be sure, is an uncertain act of political tea-leaf-reading) determines how distributed your wealth will be.  Your degree of confidence in strategies 1, 2 also grow to the extent that your future wealth-investment time horizon is long.

Besides the above unknown unknown, is the idea of correlation.  If all strategies 1,...,n are fully correlated with each other, then each of n is as good, in this one respect, as all the others.  But the degree to which any two (or more) strategies are uncorrelated or lowly correlated, opens the possibility that there was a combination of these strategies which was ideal, in some wider, as yet to be defined sense.  

So a world with a lot of serious unknown unknowns presents a difficult environment for the ideal strategy allocation algorithm, as does a world with cross strategy high correlation.  Thankfully so far the world we live in is somewhat known, somewhat predictable .  And this is the space that the theory of the ideal strategy allocation algorithm can work within, where the past can tell us something about the future, and where strategies have less than perfect correlation.