[tech-spec] Re: VIX script again, a bit less bare-bones

  • From: Tom McCubbin <tmccubbin@xxxxxxxxxxxxxxxx>
  • To: tech-spec@xxxxxxxxxxxxx
  • Date: Wed, 27 Oct 2004 12:26:48 -0400

Not to be a copy-cat steve, but fig'd i'd kick in a similar and probably useless observation. In one of our models (Tim Melvin aka the scoundrel and i), we look at unusual opens with respect to daily trading range volitility. In the referenced data file are the counts of the opens for spx constituents since 92 where the open was down > 2 std-devs for the 90day daily trading range. basically a norm'd stock-got-slam'd by bad news kinda thing.

based on these silly numbers, i would expect to see a larger than normal dumping in december of 'certain' stocks that were bought based on speculation on the outcome of the election. should be a good buyng op...maybe? seems to obvvious to be useful though.

in 2003, when VIX halfed itself, we saw a qtr reduction in these open-events, and corresponding movements in prev years.

TIX <- read.table('http://www.tggsolutions.com/downloads/vol-opens.txt', head=TRUE, sep=",")
TIXE <- TIX[ !TIX$Year%%4, ]
info<- function(M) {str(M); rbind(head(M),tail(M))}
mean_pct_of_tix <- function(M) mean( sum(M) / sum(TIX$Count) )
mean_pct_of_tixe <- function(M) mean( sum(M) / sum(TIXE$Count) )
info(TIX); info(TIXE)
round( matrix( with(TIX, by( Count, Month, mean_pct_of_tix) )*100 ), 2)
round( matrix( with(TIXE, by( Count, Month, mean_pct_of_tixe) )*100 ), 2)


> info(TIX); info(TIXE)
`data.frame':   154 obs. of  3 variables:
$ Year : int  1992 1992 1992 1992 1992 1992 1992 1992 1992 1992 ...
$ Month: int  1 2 3 4 5 6 7 8 9 10 ...
$ Count: int  98 46 49 59 48 68 83 74 82 75 ...
   Year Month Count
1   1992     1    98
2   1992     2    46
3   1992     3    49
4   1992     4    59
5   1992     5    48
6   1992     6    68
149 2004     5   116
150 2004     6    76
151 2004     7   162
152 2004     8   124
153 2004     9   131
154 2004    10   163
`data.frame':   46 obs. of  3 variables:
$ Year : int  1992 1992 1992 1992 1992 1992 1992 1992 1992 1992 ...
$ Month: int  1 2 3 4 5 6 7 8 9 10 ...
$ Count: int  98 46 49 59 48 68 83 74 82 75 ...
   Year Month Count
1   1992     1    98
2   1992     2    46
3   1992     3    49
4   1992     4    59
5   1992     5    48
6   1992     6    68
149 2004     5   116
150 2004     6    76
151 2004     7   162
152 2004     8   124
153 2004     9   131
154 2004    10   163
> round( matrix( with(TIX, by( Count, Month, mean_pct_of_tix) )*100 ), 2)
      [,1]
[1,]  8.94
[2,]  6.09
[3,]  9.36
[4,]  9.04
[5,]  6.28
[6,]  8.70
[7,]  8.98
[8,]  6.54
[9,] 12.06
[10,] 11.65
[11,]  5.22
[12,]  7.14
> round( matrix( with(TIXE, by( Count, Month, mean_pct_of_tixe) )*100 ), 2)
      [,1]
[1,] 11.59
[2,]  8.16
[3,]  9.11
[4,]  8.70
[5,]  5.33
[6,]  7.52
[7,] 10.17
[8,]  6.72
[9,]  8.10
[10,]  9.34
[11,]  4.88
[12,] 10.37
R.version.string
[1] "R version 2.0.0, 2004-10-04"



Other related posts: