1. The VIX (volatility index) is a financial index which measures the expectation of the volatility of the stock market index S&P 500 (SPX). The higher is the value of the VIX the higher are the expectations of important variations in the S&P 500 during the next month. Since volatility is a measure of risk in a portfolio, managers tend to flee away the market when the VIX increases.

    The question today is to know whether it is a good strategy to use the VIX as an indicator of risk in the market, as a fear-index.

    I downloaded the historical prices of both the S&P 500 and the VIX. Even though the VIX is not in a currency unit but in percentage, we still call the data historical prices. I propose a very simple portfolio strategy which is in total contradiction with the idea that the VIX is a fear gauge. I have a certain amount of money at the beginning of the year 2007, and I can short or long on the S&P 500 in the range of the money I have. My decision for a day only depends of the profit made by the VIX the previous day. If the VIX has increased I long on the S&P 500, if the VIX decreases I short. To define the quantity to invest in, I use a re-scaled and translated logistic function so that my decision is smooth and stay in the range I defined just before ([-1;1]). If you are interested in the logistic function you can go on the page of a good mathematics  website: http://mathworld.wolfram.com/LogisticEquation.html . Or even on the Wiki page (don’t worry I’m not crazy, I don’t trust Wiki, but this page is Okay): http://en.wikipedia.org/wiki/Logistic_regression.

    With such a strategy which is against the mainstream of the portfolio strategies we have some good results (see next figure). If you had begun your portfolio manager career the 01/01/2007 with a huge amount of…100$ and had decided to invest according to the previous strategy you would have clearly over performed the S&P 500 index. You can see this on the following graph. Next time your parents tell you a story about the monster VIX don’t be scared!


    The code (R):

    # data contains the historical prices of the VIX and of the S&P500 as well as the date
    data <- read.csv("U:/Blog/Post3/vixSP.csv", header=T, stringsAsFactors=FALSE)
    data$date<-as.Date(data$date, format="%d/%m/%Y")

    data$money = 100
    data$profitSP = 0
    data$profitVix = 0
    data$decision = 0
    length = length(data$vix)

    for(i in 2:length){
      data$profitSP[i] = (data$sp500[i] - data$sp500[i-1])/data$sp500[i-1]*100
      data$profitVix[i] = (data$vix[i] - data$vix[i-1])/data$vix[i-1]*100
    #   if(data$profitVix[i] > 7){data$decision[i] = 1}
    #   if(data$profitVix[i] < -7){data$decision[i] = -1}
      data$decision[i] = ((exp(data$profitVix[i]/5)/(exp(data$profitVix[i]/5)+1))-(1/2))*2
    }

    for(i in 2:length){
    data$money[i] = data$money[i-1] + data$decision[i-1] * data$money[i-1] * data$profitSP[i]/100
    }

    data$money = data$money/data$money[1]*100
    data$sp500 = data$sp500/data$sp500[1]*100

    plot(data$money~data$date, type = 'l', col = 'blue',axes=TRUE, ann=FALSE, ylim = c(50, 250))
    lines(data$sp500~data$date, col = 'red')

    title(xlab="Years", col.lab=rgb(0,0,0))
    title(ylab="Index (US$)", col.lab=rgb(0,0,0))
    legend("topleft",  c("Portfolio","S&P 500"), cex=1,
           col=c("blue","red"), lty = 1, inset = 0.1);
    0

    Add a comment


  2. The Olympic Games have finished a couple of days ago. Two entire weeks of complete devotion for sport. Unfortunately I hadn’t got any ticket but I didn’t fail to watch many games on TV and internet. I was looking at decathlon men competition and I was very impressed by the general quality of these athletes. They have to be able to do everything: sprinting (100 m), jumping high, jumping fast (110 m hurdles), long, throw heavy (put shot) and light (javelin) things, running longer (400 m) and even longer (1500 m)… It became obvious in my mind that it was the quintessence of the sport, every athlete has to find the perfect balance between those different performances to compete efficiently. This sport induces all the quality of a strong man: power, endurance, flexibility, sprint…

    Is it really true? Is it really the most balanced athlete who win the decathlon competition?

    I decided to test this assumption with the results of the previous Olympic Games (Beijing, 2008). I only kept the athletes who have completed all the disciplines so that I can do the study on a data set without any missing values. I used the observations of the scores for each discipline which are calculated according to the time of the distance done by the athlete. If you are interested in those details, you can have a look at the way it is calculated on: http://www.iaaf.org/mm/Document/Competitions/ ... _Tables_of_Athletics_2011_23299.pdf.

    I have been very surprised to see that the winner, Bryan Clay who has an average of 879 points per discipline, did very poorly in 400 meter (865 points), high jump (794 points) and in the 1500 meters race (522 points). On the contrary, he performed very well in 100 meters, 110 meters hurdle and long jump disciplines. Thus, I started wondering if the decathlon was not about power rather than about my so-called balance capacity in all the different areas.

    Sir Prasanta Chandra Mahalanobis answered to this question some decades ago. In 1936 he decided to create a new function to measure the distance separating two observations. The most common distance is the Euclidian distance. However, this distance does not take into account two important elements. The first element is the variance of the different variables. Indeed, let's consider the high jump discipline and the pole vault, a gap of 30 centimeters between two athletes is huge in high jumping whereas it is a reasonable difference in pole vault. The reason is easy to understand, the variance in pole vaulting discipline is higher than in high jumping. Fortunately, most of the robustness to the variance is taken into account by the international athletic association (the federation who sets the scores) – although we will see that this is not perfectly true. But there is another problem which is even more important. The correlation of the different disciplines. For example the following graphic shows a positive correlation between shot put and disc throw, which, if we think about it, makes sense! Thus, if we look for the most complete athlete, there should be no cumulative rewards - we don’t want to give athletes too many points when they have performed well in two very similar disciplines. On the contrary, if two disciplines are negatively correlated such as 1500 meters and 100 meters we want to give extra points to athletes who perform well in both of the disciplines. The Mahalanobis distance has been created in this purpose.

    If S is the matrix of variance-covariance of the data set, we can formally write the Mahalanobis distance between the vectors x and y as:
               

    Once the matrix S is computed, we can calculate the Mahalanobis score for every athlete - say the distance between zero and the scores of the athlete in the different disciplines. It was unexpected to see that the gold medal would be claimed by Oleksiy Kasyanov who has finished 7th during the Olympic Games. On the contrary, Bryan Clay the Olympic champion would now rank 5th. You can find below two tables, the first one is the ranking of the athletes according to the Mahalanobis distance, and the second one is the official decathlon ranking. As you can see they are many differences. Therefore, decathlon is not the ultimate sport of complete athlete.

    Mahalanobis Ranking
    Athlete
    Mahalanobis score
    1
    Oleksiy Kasyanov
    790.60
    2
    Andrei Krauchanka
    789.16
    3
    Maurice Smith
    767.85
    4
    Leonel Suárez
    754.27
    5
    Bryan Clay
    742.40
    6
    Yordanis Garciá
    737.40
    7
    Michael Shrade
    723.31
    8
    Romain Barras
    709.31
    9
    Aleksandr Pogorelov
    701.18
    10
    Andres Raja
    696.00
    11
    Roman Sebrle
    693.79
    12
    Aleksey Drozdov
    690.95
    13
    André Niklaus
    687.12
    14
    Massimo Bertocchi
    681.92
    15
    Jangy Addy
    681.16
    16
    Mikk Pahapill
    677.04
    17
    Mikalai Shubianok
    667.82
    18
    Hadi Sepehrzad
    653.71
    19
    Damjan Sitar
    651.63
    20
    Eugene Martineau
    637.66
    21
    Haifeng Qi
    631.22
    22
    Aliaksandr Parkhomenka
    630.64
    23
    Slaven Dizdarevic
    607.92
    24
    Daniel Awde
    607.78


    Decathlon Ranking
    Athlete
    Decathlon Score
    1
    Bryan Clay
    8791
    2
    Andrei Krauchanka
    8551
    3
    Leonel Suárez
    8527
    4
    Aleksandr Pogorelov
    8328
    5
    Romain Barras
    8253
    6
    Roman Sebrle
    8241
    7
    Oleksiy Kasyanov
    8238
    8
    André Niklaus
    8220
    9
    Maurice Smith
    8205
    10
    Michael Shrade
    8194
    11
    Mikk Pahapill
    8178
    12
    Aleksey Drozdov
    8154
    13
    Andres Raja
    8118
    14
    Eugene Martineau
    8055
    15
    Yordanis Garciá
    7992
    16
    Mikalai Shubianok
    7906
    17
    Aliaksandr Parkhomenka
    7838
    18
    Haifeng Qi
    7835
    19
    Massimo Bertocchi
    7714
    20
    Jangy Addy
    7665
    21
    Daniel Awde
    7516
    22
    Hadi Sepehrzad
    7483
    23
    Damjan Sitar
    7336
    24
    Slaven Dizdarevic
    7021


    The code (R):

    #data and data3 are randomly generated for the example

    a = rnorm(24)
    data=data.frame(shotPut=a, discusThrow=0.5*a + 0.5 * rnorm(24))
    data3=data.frame(X1=a, X2=0.5*a + 0.5 * rnorm(24), X3 = rnorm(24), X4 = rnorm(24), , X5 = rnorm(24), X6 = rnorm(24))

    lm.shotPut = lm(data$shotPut~data$discusThrow)

    plot(data$discusThrow, data$shotPut, axes=TRUE, ann=FALSE)
    abline(lm.shotPut)
    title(ylab="Score at shot put", xlab = 'Score at discus throw', col.lab=rgb(0,0,0))

    Sigma = cov(data3)
    distance = mahalanobis(data3,0 , Sigma, inverted = FALSE)

    0

    Add a comment


  3. Hello (New World!), 

    My name is Edwin, I’m a 22 year-old French student in applied mathematics. In particular, I study probability, statistics and risk theory. We learn interesting things but there is still one question I feel stupid about: Is statistics, actually, useful? I mean not theoretically but in the real life. Many friends of mine asked me this, and I vainly struggle in answering with understandable and cogent examples. I can’t get rid of the stereotypes such as the over optimistic forecasts of GDP gross given by government neither of the very easy statistics which are about collecting data rather than proper data analyses.


    Because, mathematics should never be like that... (source:http://lovestats.wordpress.com/dman/)

    This question is the reason of this blog, I would like to explain by examples how statistics and probability could offer a useful perception of our environment. Indeed, according to the Oxford Dictionary, perception is the ability to see, hear, or become aware of something through the senses, or in a second meaning, the way in which something is regarded, understood, or interpreted. This is how probability and statistics are useful. They give a perception of our environment, which might be wrong, as well as our sight can suffer from an optical illusion, but the perception may help us to understand and become aware of phenomena of our environment.

    To answer “the” question I will try to use examples as easy as possible so that not only the conclusions but also the process are understandable. As you will certainly see, I like sport, finance and risk issues, and I will use many examples from these areas to answer the question. I will use the software R to illustrate the different topics. Although, I’m not a great programmer, feel free to use my programs if you think they could be useful.  They are certainly not as efficient as possible and, again, feel free to comment any of my programs if you have any ideas to improve the program or the method.

    Finally, before blogging for the first time in my life, I’d like to thank all the people who settle in my mind the unfathomable question of the utility of statistics. In particular Claire, Justine, Arthur, Clement and Rudy (even though the three last ones certainly know better than I do how useful is statistics) for the countless, long and unfinished delicious discussions we had about statistics and probability. Claude for his unconditional but fair question: “You like mathematics, but what kind of work can you do with mathematics?” and many other people, who, I am sure will recognize they have left their print on this blog.

    Edwin.
    0

    Add a comment

Blog Archive
Translate
Translate
Loading