Skewness and Kurtosis indicator

Category: Indicators By: gabri Created: August 10, 2018, 7:30 AM
August 10, 2018, 7:30 AM
Indicators
10 Comments

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 Master
Currently debugging life, so my bio is on hold. Check back after the next commit for an update.
Author’s Profile

Comments

Logo Logo
Loading...