Steversteves

Cumulative Distribution of a Dataset [SS]

Steversteves 已更新   
This is the Cumulative Distribution of a Dataset indicator that also calculates the Kurtosis and Skewness for a selected dataset and determines the normality and distribution type.

What it does, in pragmatic terms?

In the most simplest terms, it calculates the cumulative distribution function (or CDF) of user-defined dataset.

The cumulative distribution function (CDF) is a concept used in statistics and probability to describe how the probability of a random variable taking on a certain value or less is distributed across the entire range of possible values. In simpler terms, you can conceptualize the CDF as this:

Imagine you have a list of data, such as test scores of students in a class. The CDF helps you answer questions like, "What's the probability that a randomly chosen student scored 80 or less on the test?"

Or in our case, say we are in a strong up or downtrend on a stock. The CDF can help us answer questions like "Based on this current xyz trend, what is the probability that a ticker will fall above X price or below Y price".

Within the indicator, you can manually assess a price of interest. Let's say, for NVDA, we want to know the probability NVDA goes above or below $450. We can enter $450 into the indicator and get this result:


Other functions:

  • Kurtosis and Skewness Functions:

In addition to calculating and plotting the CDF, we can also plot the kurtosis & Skewness.


This can help you look for outlier periods where the distribution of your dataset changed. It can potentially alert you to when a stock is behaving abnormally and when it is more stable and evenly distributed.

  • Tests of normality

The indicator will use the kurtosis and skewness to determine the normality of the dataset. The indicator is programmed to recognize up to 7 different distribution types and alert you to them and the implications they have in your overall assessment.

e.g. #1 AMC during short squeeze:


e.g. #2: BA during the COVID crash:


  • Plotting the standardized Z-Score of the Distribution Dataset

You can also standardize the dataset by converting it into Z-Score format:


  • Plot the raw, CDF results


Two values are plotting, the green and the red. The green represents the probability of a ticker going higher than the current value. The red represents the probability of a ticker going lower than the current value.

Limitations

There are some limitations of the indicator which I think are important to point out. They are:

  • The indicator cannot tell you timelines, it can only tell you the general probability that data within the dataset will fall above or below a certain value.

The indicator cannot take into account projected periods of consolidation. It is possible a ticker can remain in a consolidation phase for a very long time. This would have the effect of stabilizing the probability in one direction (if there was a lot of downside room, it can normalize the data out so that the extent of the downside probability is mitigated). Thus, its important to use judgement and other methods to assess the likelihood that a stock will pullback or continue up, based on the overall probability.

  • The indicator is only looking at an individual dataset.

Using this indicator, you have to omit a large amount of data and look at solely a confined dataset. In a way, this actually improves the accuracy, but can also be misleading, depending on the size and strength of the dataset being chosen. It is important to balance your choice of dataset time with such things as:

a) The strength of the uptrend or downtrend.
b) The length of the uptrend or downtrend.
c) The overall performance of the stock leading into the dataset time period

And that is the indicator in a nutshell.

Hopefully you find it helpful and interesting. Feel free to leave questions, comments and suggestions below.

Safe trades everyone and take care!
發布通知:
Had to update the table as there was a problem on certain distribution assessments with the two data tables overlapping. Final product:

發布通知:
Quick little re-fix

Premium indicators and content have launched! Get access at: www.patreon.com/steversteves
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?