I have financial data whose statistical properties I'd like to analyze.
I'm new to this so any pointer would be appreciated.
I would like to do the following:
plot a moving average of the mean/sd/skewness/kurtosis, where either I
would use a fixed horizon, e.g. 60 observations (add one drop one as you
move with time) or I would use exponentially declining weights on distant
observations, for a fixed predetermined weight parameter.
I have found user-contributed programs to do that for the mean/sd, but not
for the skewness and kurtosis. I'm especially interested in the kurtosis.
In fact, I would like to also compute semi-kurtosis, e.g. semi-kurtosis
for negative returns or for returns below average.
I could probably work this out on my own by writing down the formulas in
terms of the first 4 moments, but I have read exchanges that suggest that
efficiency issues may be important, so I'd like to start on the right
track, and would thus appreciate your suggestions.
my dataset has the date and the daily return for different portfolios x1,
x2, x3, etc. over a 30 year period, so efficiency in the code is likely to
be necessary.