The volatility mystery continues

December 5, 2011
By

(This article was first published on Portfolio Probe » R language, and kindly contributed to R-bloggers)

How do volatility estimates based on monthly versus daily returns differ?

Previously

The post “The mystery of volatility estimates from daily versus monthly returns” and its offspring “Another look at autocorrelation in the S&P 500″ discussed what appears to be an anomaly in the estimation of volatility from daily versus monthly data.

In recent times estimates of volatility from monthly data appear smaller than volatility estimated from daily data.  Hypotheses about what is happening include:

  • There is autocorrelation in the returns
  • There is some sort of garch effect
  • There is no real discrepancy, just noise

The data

The data used in the present analysis are daily log returns on the S&P 500 starting at the beginning of 1989.  This is broken into 7 blocks each of length 800 trading days — so slightly more than 3 years.  800 because it is divisible by 5 (weekly) and 20 (monthly).

The estimates for these blocks from several time scales are shown in Table 1.

Table 1: Volatility estimates with returns of different lengths (in days) for the 7 blocks.

B1B2B3B4B5B6B7
114.49.113.921.419.612.529.7
214.49.113.620.819.111.629.8
515.18.412.019.221.511.223.9
1014.47.011.619.521.49.623.5
2014.47.212.017.221.910.422.5
4015.06.59.815.015.510.027.0

The effect looks quite noisy in Table 1.  Perhaps there is nothing to investigate, but let’s persevere.

GARCH

A problem with volatility is that it is unobservable.  Using garch models can sort of help that — they give us an estimate of volatility for each time point.  Table 2 shows the results we get by averaging the garch estimates of volatility within each block.

Table 2: Volatility derived from garch models of returns of different lengths (in days) for the 7 blocks.

B1B2B3B4B5B6B7
114.710.013.620.918.612.325.4
214.710.313.620.218.011.925.0
515.510.112.419.020.011.422.4
1015.29.912.419.121.110.722.2
2015.111.613.616.621.512.321.7
4015.211.713.214.516.312.521.3

The effect looks smaller here, but there are hints that it hasn’t disappeared entirely.

If garch does explain the phenomenon (should it exist), then I would have expected how volatility acts within each block to matter.  Figure 1 shows the garch volatility, but I don’t see a connection.

Figure 1: GARCH volatility based on 1-day returns.

Cycles

When we aggregate the daily returns into longer time periods, the particular days that go together can matter.  Perhaps all we are seeing is that the estimates with returns from longer time frames are noisier and hence we happen to have seen small ones sometimes.

We can test this by moving the starting point through a cycle.  The way it was done here was to paste the unused values at the start onto the last data point.  So there is one artificial data point in all but one of the cycles, but the same 800 daily returns are used in each case.  We then get a distribution of volatility estimates.

We can create a different distribution which runs through the cycles but first does a random permutation of the daily returns.  With this distribution we know there is no autocorrelation.  But we are also destroying the volatility clustering, so we can’t distinguish between those two hypotheses.

The subsequent figures include:

  • a boxplot of the volatility estimates from aggregations of the actual daily returns (denoted “cycle”)
  • a boxplot of the volatility estimates from aggregations of permuted daily returns (denoted “permute”)
  • the volatility estimate from the daily returns (horizontal blue line)
  • the 95% bootstrap confidence interval of the daily volatility estimate (horizontal gold lines)
  • the actual volatility estimate from aggregated data that appears in Table 1 (horizontal black line)

Figure 2: Volatility estimate distributions for 20-day returns on block 1 (1989-01-03 to 1992-03-02). In Figure 2 we see the behavior that we would expect.  Both boxplots are pretty much centered on the estimate from the daily returns.  The actual estimate from the aggregated data happens to be very close to that from the daily data, but it could have been quite far away.  This shows that the estimates with monthly data are substantially more variable than those from daily data.

Figure 3: Volatility estimate distributions for 20-day returns on block 2 (1992-03-03 to 1995-05-01). In Figure 3 we see the typical pattern: the estimate from the aggregated returns is smaller than either the daily estimate or aggregation with permuted returns.

Figure 4: Volatility estimate distributions for 20-day returns on block 3 (1995-05-02 to 1998-06-30).

Figure 5: Volatility estimate distributions for 20-day returns on block 4 (1998-07-01 to 2001-08-30).

Figure 6: Volatility estimate distributions for 20-day returns on block 5 (2001-08-31 to 2004-11-09).

Figure 7: Volatility estimate distributions for 20-day returns on block 6 (2004-11-10 to 2008-01-15).

Figure 8: Volatility estimate distributions for 20-day returns on block 7 (2008-01-16 to 2011-03-18). Figures 2 through 8 showed the situation for aggregations to 20 days.  Figures 9 through 15 are of aggregations to 5 days.  In these cases the “cycle” boxplots are only representing 5 datapoints rather than 20.

Figure 9: Volatility estimate distributions for 5-day returns on block 1 (1989-01-03 to 1992-03-02).

Figure 10: Volatility estimate distributions for 5-day returns on block 2 (1992-03-03 to 1995-05-01).

Figure 11: Volatility estimate distributions for 5-day returns on block 3 (1995-05-02 to 1998-06-30).

Figure 12: Volatility estimate distributions for 5-day returns on block 4 (1998-07-01 to 2001-08-30).

Figure 13: Volatility estimate distributions for 5-day returns on block 5 (2001-08-31 to 2004-11-09).

Figure 14: Volatility estimate distributions for 5-day returns on block 6 (2004-11-10 to 2008-01-15).

Figure 15: Volatility estimate distributions for 5-day returns on block 7 (2008-01-16 to 2011-03-18). There seems to be an anomaly within the anomaly in that the 40-day aggregation for block 7 displays “good” behavior as shown in Figure 16.

Figure 16: Volatility estimate distributions for 40-day returns on block 7 (2008-01-16 to 2011-03-18).

Summary

I think what’s been shown here is that there really is a phenomenon to explain.  But we haven’t yet pinned down an explanation.

There is the hypothesis that infinite variance could be the cause of the weird behavior.  I don’t believe that the variance is infinite; but if it were, I don’t think that would cause what we’ve seen here as the variance would be infinite in all cases.

Questions

How do we test if volatility clustering is causing the effect?

Epilogue

And something is happening here
But you don’t know what it is
Do you, Mister Jones ?

from “Ballad of a Thin Man” by Bob Dylan

Appendix R

There are two main parts to this analysis:

  • garch estimation
  • cycling, permuting and bootstrapping

garch estimation

The garch models were estimated like:

require(rugarch)
gs1t <- ugarchfit(ugarchspec(distribution='std'), spxretd1)

This estimates a garch(1,1) model assuming the residuals have a Student’s t distribution.  It also assumes an ARMA(1,1) process for the mean.  The exact specification seems to make essentially no difference for our purposes. Since we are only interested in the in-sample volatility, pretty much any semi-reasonable garch coefficients would probably do.

A basic version of Figure 1 is:

plot(sigma(gs1t) * 100 * sqrt(252), type='l')

The estimation of garch models is a surprisingly tough task.  I’ll not recommend any garch software without thoroughly investigating it.  But getting similar garch coefficients whether the returns are in their natural scale or in percent is comforting.

cycling, permuting and bootstrapping

Some functions were written to do these tasks, and are listed (with rather bizarre formatting) in volatility_est_funs.R.

cut and paste

A labor-saving device to put the dates of the blocks into the figure captions was to paste (in the R sense) the dates together into strings, and then to cut and paste (in the GUI sense) those into the captions.  The R code was:

jjb <- seq(1, by=800, length=7)

paste(' (', names(spxretd1)[jjb], ' to ', names(spxretd1[jjb+799]), ')', sep='')

Subscribe to the Portfolio Probe blog by Email

To leave a comment for the author, please follow the link and comment on his blog: Portfolio Probe » R language.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , , ,

Comments are closed.