gabri

Skewness and Kurtosis indicator

Category: Indicators By: gabri Created: August 10, 2018, 7:30 AM
August 10, 2018, 7:30 AM
Indicators
10 Comments
Skewness and Kurtosis indicator

This indicator shows the skewness and kurtosis of a title. For all the statistic lovers 🙂

In probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or undefined.
kurtosis is a measure of the “tailedness” of the probability distribution of a real-valued random variable. In a similar way to the concept of skewness, kurtosis is a descriptor of the shape of a probability distribution and, just as for skewness, there are different ways of quantifying it for a theoretical distribution and corresponding ways of estimating it from a sample from a population.

 

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

Download
Filename: PRT-skew-and-kurt.itf
Downloads: 155
gabri
gabri Master
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

zilliq
6 years ago
#

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

Pepsmile
8 years ago
#

Hi everybody, An application could be found by applying this indicator on the strategy profit instead of the prices. What do you think?

gabri
8 years ago
#

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.

Bard
8 years ago
#

Thanks Gabri, How do you like your Turkey cooked? https://www.dropbox.com/s/1afg6qqqffgfasw/GBP-TurkLira.png?dl=0

gabri
8 years ago
#

Luxrun, the second value is the period of the moving average and the third one the kind of average used (in this case exponential). In this code I didn't paint the moving average but I like to have also showing a moving average of the skewness.

luxrun
8 years 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

gabri
8 years ago
#

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.

juanj
8 years ago
#

This is very interesting but how is this to be interpreted?

denmar
8 years ago
#

Purple haze.

Nicolas
8 years ago
#

,all around Don't know if I'm comin' up or down!

ProRealCode ProRealCode
Loading...