//
you're reading...

Finance

More on higher moments: rolling skewness of S&P 500 daily returns

In this post, Portfolio Probe explores a way to decide whether market kurtosis and skewness are predictable.

Market skewness, in naive financial modeling, is some kind of measure of (as-)symmetrical distribution of (daily) returns around the average market return. A higher skewness would tend to indicate a denser distribution of higher returns, compared to lower or negative returns.

In the cited example, skewness was estimated based on even partition of years since 2008. While is this is a neat idea, it seems like a good idea to study the evolution of a rolling skewness (skewness of returns of the preceding n days).

Below is a quick piece of R code to describe the distribution / fluctuation of a 30-day rolling skewness of the S&P 500 daily returns since 1980.

Surprisingly, the skewness is rather volatile, with sudden high negative values. The distribution of rolling skewness is negatively skewed as well.

library(PerformanceAnalytics)
library(quantmod)
rm(list=ls())
getSymbols(c("^GSPC"), from="1980-01-01")
part <- function(i) GSPC[i:(i+30)]
part2 <- function(i) skewness(Return.calculate(Cl(part(i))))
skews <- unlist(lapply(1:(length(GSPC)/6-30), part2))
head(skews)
plot(ts(skews), col='blue')
hist(skews, breaks=50, col='cyan')

Photograph used with permission from mylittleshoebox.ca

Discussion

2 Responses to “More on higher moments: rolling skewness of S&P 500 daily returns”

  1. Eric,
    In your code I see:
    part part2 skews head(skews)
    I am interested in your code to produce the graphs.
    Will you give the code for that.
    Thanks,
    Andre

    Posted by andre | October 16, 2011, 7:37 am

Post a Comment

About

Eric Nguyen is a data scientist with current focus on Finance, Economics, Big Data Analytics, and Social Mood analysis.

more

Topics