ltrd Profile picture
Jun 10, 2022 12 tweets 4 min read Read on X
Creating Trend Lines systematically

Today, I would like to present the idea of how to systematically create trend lines to find trends in prices, find divergences in indicators and remove outliers in your trending data. #Trading #Cryptocurrency #AlgoTrading
I see a lot of people that base their systems on trend lines or divergences between some indicator and the price. Although my systems are not related to this kind of trading, it is really fun to come up with new ideas and try quantifying market relations.
Idea is to use quantile regression rather than simple linear regression. What we try to do is to estimate conditional quantile function - intuitively we do not estimate the mean for some population but rather a quantile of this population based on some variables.
Here we have some randomly generated data. It has some trend and we would like to find boundaries of this trend prices, just like we do often with finding divergences or removing outliers. Image
We can remove every data point that lies above the upper trend line generated by quantile regression and below the lower line generated. It can easily remove you with a systematic manner the outliers from trending data, but it is not the best utility that it has. Image
This is a plot of an hour of data from ETHUSDT for Binance Futures perpetual swap. You can see a downtrend and we will use quantile regression to find a specific trendline and countertrend in CVD (Cumulative Volume Delta) for this instrument. Image
We created a model just by doing something like that → statsmodels.formula.api.quantreg('CVD ~ ind', ethusdt).fit(q=0.01). We did the prediction using this model and it looks like that. Image
A really interesting pattern can be seen in CVD data for this particular hour. You can see quite a significant uptrend and also - as a conclusion - a divergence between price and CVD. I know that a lot of you guys using something like this to predict countertrend entry. Image
You should try to do something like this for yourself. Firstly on synthetic data created for yourself (it is also a good skill to create appropriate synthetic data very fast) and then on real data, but remember (!) that the most important are ideas - not the technique.
Think about how to use it. Do not focus on making money, but try to think about how this technique can be used in a broader range. The first thing that comes to my mind is something like this.
Find all of the situations on the market when there is the highest divergence between price and CVD measured by the difference between the slope of the trendline of price and CVD. Analyze all of the outliers in those values and check if something is interesting. Be creative.
As @therobotjames mentioned today → that’s it. That’s the tweet.

• • •

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

Keep Current with ltrd

ltrd 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!

More from @ltrd_

Dec 10
Today’s dump resulted in the biggest liquidation since 2021. I would like to present a microstructure view of this entire situation. As always, this thread is full of insights, charts, and comments.

Retweet if you enjoyed the analysis. Image
Firstly, when discussing this kind of dump, we need to determine where the pressure was greatest. We observed something crazy—Coinbase traders began selling aggressively almost an hour before the mega dump. Image
Of course, the biggest drop was triggered by a liquidation cascade, but this constant selling pressure was crucial in pushing the price into a region where overleveraged positions were forced to close. How can we tell that the market was overheated? It’s simple—the Funding Fee plus the increase in Open Interest. These two factors are drivers of the current market and indicate that people are overleveraged.
Read 12 tweets
Dec 3
Korea declared Martial Law. It was one of the most spectacular trading events I've ever witnessed in my trading career. I've prepared detailed explanations of what exactly happened in the market and why it was so different from any other event. If you enjoyed it, please retweet! Image
BTC on Upbit was priced under $65k, while we saw almost $95k on Binance— $30k difference between Korea and the rest of the world. That was absolutely crazy. We observed big sell pressure, with almost $7mm more in sell orders than buy orders. The next plot is the most important.
Here, we have the price action as well as CVD for USDTKRW. You can see that about $50mm was sold in a couple of minutes. With normal liquidity, that would not have been so brutal, but all the players just disappeared from the market, causing a drop to 75 cents. Image
Read 9 tweets
Nov 9
🧵BTC vs. Polymarket @Polymarket analysis

As you can see on the plot, price action of BTC and TRUMP winning elections is pretty similar. Significant moves were seen both on BTC and TRUMP from around midnight UTC.
Let's deep dive a little bit more into the data.

#Election2024 Image
It can be seen that in time of bigger volatility BTC was reacting much faster that polymarket. The time difference is of course much, much bigger than block time.
Here we have regression plot for price differences (15 minutes) on BTC and TRUMP. You can clear see how correlated they are. Image
Read 6 tweets
Oct 11, 2023
I've read and analyzed the book “Going Infinite” by Michael Lewis about SBF. I'll try to show you interesting quotes, problems, lies, and why the fundamental problem was that SBF was a complete chronic liar. I’ve worked on it for a few days and it'll be a big thread.
1/43 🧵 Image
[2/43] I am going to split the topics into four parts: the book, SBF, FTX, and overall conclusions. All of the topics will be described with examples, quotes, and my own analysis and opinions.
[3/43] The first thing is the book - most of it (~70%) is about idealizing SBF and creating an image of a genius and the most generous person in the world. All of the worst possible personality traits were justified by his greatness.
Read 45 tweets
Jun 11, 2023
[1/n] Friday’s night crash was very interesting because there was no big news at this moment and some of the instruments fell about 50% within two hours. I would like to break down the microstructure behaviors and do an overall analysis from that day. 🧵

#trading #cryptocrash Image
Firstly, let’s take a look at the macroscopic view of the market. On the histogram, we can see the changes from the highest price to the lowest price within the first couple of hours of June 10th (UTC). Big moves around the whole crypto space. Image
Some of the instruments fell about 50% and GTC fell over 73% due to the fact that during such crashes, liquidity is poor. This example can show you how liquidity is important when there is huge volatility in the market. Unfortunately, this move happened during the weekend.
Read 11 tweets
May 7, 2023
[1] The hottest topic in the crypto universe last couple of days was $PEPE - a meme coin that went to top 40 coins and was the biggest meme surprise since SHIB in October 2021. How did the market look in the HFT data? Let’s see! 🧵🧵

#pepe #cryptocurrency #trading Image
[2] I focus on CEX trading because there were more analyses related to the $PEPE and trading on DEXes, such as the great thread by @thiccythot_ which can bring you a lot of value in terms of understanding what happened on $PEPE. Highly recommended thread.
[3] What is important in terms of the analysis of $PEPE is that we should divide our analysis into two periods: The first move with only a couple of exchanges that had $PEPE listed with really small liquidity and the second move with other exchanges in the game such as OKX. Image
Read 18 tweets

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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(