Docs

ta.kurt

Measure how heavy the tails of the window are compared with a normal curve.

itm
ta.kurt(source, length, min=length)

Excess population (biased, g2) kurtosis over the window: m4 / m2^2 - 3, both moments taken with divisor length. The 3 is subtracted, so a normal window reads about 0 rather than 3. Add 3 for the raw fourth standardised moment. No sample bias correction. na when the window has zero variance.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
sourceSeriesnumber--The series to read.
lengthConstantnumber-1 to 10000Window in observed bars.
minConstantnumber-1 to 10000Valid values the window must hold before it reports (an option, written min=15). An na is skipped. Absent = length: the window must be full and gap-free.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
length bars. Names in the warm-up are this operator’s parameters.
Missing values
Returns na until length consecutive non-na observations are in the window. An na resets the accumulation. na when the window has zero variance. With min=, an na is skipped and the value is taken over the valid observations once there are at least min of them.

Example

itm
ta.kurt(close, 20)
itm
plot(ta.kurt(ta.ret(close), 50), "Tails 50")