This indicator shows the skewness and kurtosis of a title. For all the statistic lovers 🙂
Blue skies!!
a=std[periodo](close)
b=average[periodo](close)
n=periodo
s=a*a*a
//computation skeweness
Skewprimo=summation[periodo](close*close*close)
Skewsecondo=-3*b*summation[periodo](close*close)
Skewterzo=3*b*b*summation[periodo](close)
Skewquarto=-b*b*b*n
modskew=(skewprimo+skewsecondo+skewterzo+skewquarto)/(n*s)
//computation kurtosis
kurtprimo=summation[periodo](close*close*close*close)
kurtsecondo=-4*b*summation[periodo](close*close*close)
kurtterzo=6*b*b*summation[periodo](close*close)
kurtquarto=-4*b*b*b*summation[periodo](close)
kurtquinto=+b*b*b*b*n
modkurt=((kurtprimo+kurtsecondo+kurtterzo+kurtquarto+kurtquinto)/(n*s*a))-3
return modskew coloured (200,0,0) as "Skewness",modkurt coloured (0,0,200) as "Kurtosis", 0
You must be logged in to post a comment.
Brined :) look on this indicator how on the 6th and on the 9th you have very high positive skew (with right tails) and heavy kurtosis. It means that the big majority of the closes are 1 or 2 deviations standard below the average while peaks of closes 4/6 times the STD above the average start to appear. SIgns were building up already a few days ago.
gentile gabri, in the graph of the indicator skewness and curtosis I see three values indicated (100, 20, 1) while the only variable required by prt is periodo (which I tried at 20 and 100). The resulting graphs are different from those shown by you; Is this normal or is something missing in the instructions posted on prorealcode? Thank you
This is not an indicator but just a tool to assess how the price relates to the average used. It can be helpful for all the people using Bollinger's band and also for long term traders. How to read it. A skewness below 0.5 and above 0.5 is considered normal. Below -0.5 is skewed left, meaning that prices statistically have the tendency to be around the average but they had throughs below the average outside the standard deviations. Above 0.5 is the opposite. A kurtosis above 0 means that the majority of the prices are around the average and just a little amount of them are outside the standard deviation. As a reference when you see skewness around 0 and very high kurtosis the prices should have little volatility and they are more predictable. When Kurtosis is below 0 volatility is pretty high. This is the theory in a nutshell.
Thanks for your indicator Gabri but are you sure for your code because on EUR/USD for example I have a kurtosis of -100, -200 ... You use a Fisher or Pearson approximation ? Sorry I can't post a picture here Thanks