While creating this variable in stata14 I've got an error (198) this is the variable that I want to generate:
g ncskew =(-(([_n])*([_n-1])^(1.5)*(sum(returns^3))))///
/(([_n-1])*([_n-2])*(sum(returns^2)^(1.5))
It is quite a puzzle but I think that the brackets are well placed. Any help or advice would be appreciated.
_n
to mean number of observations so far (and I can't make sense of your calculation otherwise) then the square brackets are redundant. – Nick Cox