OPEN-SOURCE SCRIPT

Cumulative Distribution of a Dataset [SS]

업데이트됨
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
statistics

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


For real-time updates and premium indicators, consider joining my group at: patreon.com/steversteves
또한 다음에서도:

면책사항