Everyone knows about the importance of volume but how can we detect anomalous volume on the charts?

The goal of this thread is to discover just that
This idea came about after coming across the following chart

You can see clear signs of accumulation in the form of those high volume spikes coming into 2020 but how can we automate such process?

Is anomalous volume for 1D enough? Or do we need to aggregate into 3D? Maybe 1W? Image
First we need to get the data from the exchange, in this case #Binance

Having a quick glance on data retrieval from Binance using Python, it took me about 1h to get the volume data from this pair

Here it is

Hmm so spiky and unclear, let's see if we can make sense of it Image
Currently attempting to plot basic statistical analysis on this however I believe the trigger lies somewhere in variance and the normal distribution graph

Currently I managed to select the trading weeks with above average volume but that is not very sophisticated Image
Taking a look at the 3D volume distribution

We clearly see in the following histogram that there is a pattern in here :) Image
The current point I'm stuck is which probability distribution function should I use to measure the volume outliers

At the moment I'm considering the following distributions:

-normal
-half normal
-exponential
And here are the three charts.

The blue vertical lines represent σ, 2σ and 3σ respectively.

Interestingly all whilst the norm and half norm show 7 outliers, the exponential shows 15

Outlier here is a value higher than 3σ ImageImageImage
The biggest mind bending concept is that these outliers are dependent on

Timeframe selected & chosen prob distribution

The first will impact the number of events found and the latter, will impact the 3σ and thus the level at which the event is considered an outlier
Also, the current algorithm will not find the highlighted region because historically it does not hold the highest volume days

At the same time, we can see that someone turned on the bot button and was accumulating this coin for a while

The challenge is to spot these too.. Image
Alright, after playing with settings for a while, the monthly timeframe seems to be giving the desirable results in combination with the exponential distribution and changing the outlier setting to 2σ (previously it was set at 3σ

The outlier >2σ region is highlighted below ImageImageImageImage
The second example here does not show the volume to be significant however

Perhaps if the dataset was split and analysed for each year, the highlighted arrows would be caught by our algorithm

Will try this out next, as well as graph the chart itself in Python so.. 1/ ImageImageImageImage
..2/ I don't have to draw these rectangle highlighting the volume each time

I'm feeling challenged and engaged but have other things to finish

Day has 2:30hr more

Let's see what I can do :)
It took me a bit too long than I would like to but finally managed to graph the chart ohlc with volume as well

Next, I aim to highlight the outliers on the chart below

So I don't have to do it manually on TradingView

Everytime Image
#feelsgoodman

Outliers are highlighted on the histogram showing abnormal volume levels on chart n1

Below it, the outliers are highlighted historically Image
Outlier candles with 2 standard deviations using the exponential distribution on the weekly timeframe

Chart is plotted only for the year of 2019

ie. the highlighted regions represent outstanding weekly volume ONLY in 2019

Working on some presentation looks :) Image
Lastly, just need to combine weekly outlier volume for 2018 and 2019 (bottom graphs) ImageImage
Here is the final result, arriving at 9 weekly volume candles during the entire price history of this coin that are of significance

The chart clearly shows why

Particularly interested in identifying weeks such as the one after 2019-08 ImageImage
The wonders of automation 😍🙏🏼
Following a brief scan the algorithm highlighted these:

#LENDBTC
#XMRBTC
#DASHBTC
#AIONBTC
#ETCUSDT
Recalling that the goal of the thread was to find anomalous volume

Think the goal is achieved

Now need to be creative and specific of what I want as triggers otherwise there will be too many Image
Added a progress bar in the algorithm and reports are outputted in PDF's

Both histogram and chart are present for ease of visualization

Happy with what I've accomplished here

Takes around 6/7 minutes to run, relatively quick if you're scanning weekly candles ImageImageImage
This was the end of this challenge

Have a clear look at my progress during this week as well as my reasoning for reaching this point

With the help of @threadreaderapp unroll
@threadreaderapp Here is a review video of the entire process and how I did it

Hope you enjoy

Like & RT appreciated

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Be Independent Tribe

Be Independent Tribe Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!