Wednesday 31 December 2014

Chebyshev’s Inequality and Tail Risk


“The sacred geometry of chance
The hidden law of a probable outcome”
Sting, “Shape of My Heart”

Tail risk is commonly defined as probability of rare events (technically speaking tail risk is risk of an asset moving more than three standard deviations away from the average).  From the graphical presentation of the returns of most of the financial assets easily can be seen that the tails of the distribution are fatter than the normal distribution. Earlier posts in this blog placed an equal focus on daily returns of certain CEE indices as well as the standardized returns (number of standard deviations from the average return) in an effort to grasp more value-added information from data available.

The assumptions of the underlying distribution predetermine the results and generally this presents problem to analysts (for instance, VaR under normal distribution assumption has significant flaws). In some previous posts in this blog two Extreme Value Theory approaches have been used with relation to Romanian and Bulgarian stock exchanges. For the sake of completeness, another measure needs to be revealed as well – Chebyshev’s inequality. One advantage of Chebyshev’s inequality is that it is valid in any distribution. The drawback is that it is too general and can provide too high probability of extreme values. So, as the normal distribution underestimates extreme values probabilities, Chebyshev’s inequality overestimates the extreme values probabilities.


For a given mean and standard deviation, Chebyshev’s inequality states that:
for any t>0.
Stated in an equivalent form:
However, t needs to be greater than 1.

Chebyshev’s inequality says that no more than 1/t^2 of the values can be more than t standard deviations away from the mean (stated as a maximum), or put in an alternative way, at least 1−1/t^2 of the values are within t standard deviations of the mean (stated as a minimum).


Chebyshev’s inequality results in higher probability of extreme cases compared to the normal distribution. For instance, if we want to know what is the probability of having cases at 3 standard deviations from the mean (t=+/-3 in the Chebyshev’s inequality formula). Chebyshev’s inequality states that at least 88.8% of values must lie within +/-3 standard deviations from the mean (or equivalently, no more than 11% of the values can be more than 3 standard deviations from the mean). The result for normal distribution is 99.7% (this is also known as empirical rule 68–95–99.7 or the three-sigma rule that briefly states that extreme values are barely possible). The chart and table below present four cases for probabilities to have more than t standard deviations from the mean: Chebyshev’s inequality, one-tailed version of Chebyshev’s inequality (also known as Cantelli’s inequality) and Standard normal distribution probabilities – one-tailed and two-tailed. Cantelli’s inequality is helpful in identifying the worst confidence level for heavily skewed or leptokurtic distributions (Lleo and Ziemba, 2014).


Wednesday 17 December 2014

The Power of Prior Probabilities: The Monty Hall Problem



I cannot find an example that can describe in a more vivid way the importance of prior probability than the famous Monty Hall problem (having the TV game “Let’s make a deal” as its basis)! There are many explanations how the Monty Hall’s “switch the choice” strategy works. I remember a case when I explained how this works to couple of people and I needed to simulate the game and count the winning cases.

The reason why the result of this game may sound counterintuitive is the fact that the prior probabilities are neglected when processing new information. And while it seems that given chance is fair, in fact it is not. The second catchy  issue in this problem is accounting the choice of the host.

In a nutshell, the game is as follows: the player has a choice of three doors, behind one door is the prize and the remaining two doors are empty. The player chooses one door in a 1/3 probability to win. The host, who knows where the prize is, opens one of the two doors and gives a chance to the player either to switch or not to switch. It is widely known that at the second choice the probability is not 1/2 but 2/3 as the prior probability is also having its place in the game. How come?
Let’s start with the Bayes Theorem:
 
which we read as Probability of event A happens given the happening of even B in the context of event C. For the Monty Hall problem solving the reading would be “probability of having the prize at door A, given the host opened door B in the context the player choice is door C”. Or in a more concise manner: probability of having the prize at the door that has not been initially selected by the player.

Using these fundamentals to the Monty Hall problem:





The first part of the right side is equal to 1 since the host knows where the prize is and will not open the door with the prize.
The second part, the probability of having the Prize in door A given the player chooses door C, is 1/3 (this is the a priori probability).
And the final part of the right side (the denominator in the equation) is 1/2 since there are two doors the host can open – given that one door has already been selected by the player.
 
Using similar statements for probabilities, it can easily be found that the probability of winning the prize in the context of keeping the initial selection unchanged is 1/3.
Briefly, Monty Hall problem states the importance of the prior information, prior decisions, prior probabilities into your current decision-making.
I also made a simple R program for the game (it is very detailed and can be done in a much shorter way). The result of winning the game when changing the initially selected door is 67% (it varies, depends on simulations).

Monty_hall<-function() {
  doors<-1:3
  first_choice<-sample(doors,1) ## randomly select one door, probability to win is 1/3
  prize<-sample(doors,1) ## randomly put the prize behind one door
  if (first_choice==prize) {
    door_for_open=sample(doors[-first_choice],1)
  } else {
    door_for_open=doors[c(-first_choice,- prize)]
  } ## host opens one door that is different than the door with prize and already selected door
  door_switch<-doors[c(-first_choice ,-door_for_open)]
  decision<-0:1 ## 0 is keep original choice; 1 is changing choice
  keep_or_switch<-sample(decision,1)
  if(keep_or_switch==0) {
    choice=first_choice
  } else {
    choice=door_switch
  } ## the player has a choice to select among the two doors remaining after the host opened one door
  if ((keep_or_switch==1) | (choice==prize)) {
    result=1 ## 1 is win, given switch; 0 is lose
  } else {
    result=0
  }
}
 
This can be run – say 10,000 times –for instance using the following codes:
game<-replicate(10000, Monty_hall())
game_win<-game[game==1]  ## we want only the “winning” cases
length(game_win)

Saturday 13 December 2014

What Do VIX and VIX Futures Say

Look at the level of VIX and VIX Futures between 2 dates– Dec 1, 2014 and Dec 11, 2014. The chart below shows that the VIX term structure changed its shape – from  contango on Dec 1, 2014 (i.e. spot VIX below the VIX futures level) to moderate backwardation compared to spot VIX level for the near-term expiring futures and flat for the longer term expirations on Dec 11, 2014. It is also interesting to note that the Dec 11, 2014 term structure has its values oscillating around the long-term historical average (2004-2014 period) of VIX of 19.6. So the expectations of the 30-day volatility, implied in the VIX futures on Dec 11, 2014, are for moderately lower volatility, while at the beginning of December futures levels clearly have indicated increase of volatility. Near-term maturing futures as well as the VIX itself changes were more palpable than the longer term maturing VIX futures (see the gap between Dec 1 and Dec 11, 2014 for the near-term maturity and longer-term maturity). While players are generally paying a premium for future volatility insurance (Dec 1, 2014 in our case), this was not the case on Dec 11, 2014.



So what? Is this a signal that difficulties for the markets will continue in the short-run? Well, depends.


It is assumed that VIX is mean-reverting, i.e. tend to revert to the long-term average level. Is it so? An approach to check this is to use rescaled range analysis (explained in a previous post) on log-changes of VIX for the period Jan 2, 1990-Dec 12, 2014. Applying the same methodology as used for checking selected CEE stock indices state, we get value for the H-exponent  (the slope coefficient of the linear regression) of 0.3679. This result shows that VIX index does really exhibit a mean-reverting pattern. 
 While term structure of VIX-VIX Futures has been experiencing backwardation pattern in the past (2008, 2010, 2011) when markets faced with trouble, spot VIX was above the long-term average level. Currently, this is not the case. So, in my opinion, the reading of the recent VIX spike does not necessarily imply  the current hard times for the markets to continue (moreover, VIX futures expiring in Jul and Aug 2015 trade at higher levels than spot VIX).