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_

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
Mar 26, 2023
A couple of days ago we had probably the most important listing this year - $ARB. It is the best possibility to understand the market because of the lack of perpetual swaps, withdrawals, and liquidity. Let’s take a look at it through the eyes of an HFT player.

#Arbitrum
In the first minutes of the trading, there is absolutely Wild West in terms of the market microstructure. You do not have perps and withdrawals, so the capability of HFT players is limited and then you can see the purest form of trading.
One of the first exchanges that listed $ARB was Kucoin. How different and strange is the market in the first minutes can be proved by the fact that although the possible price consensus for ARB was $1.3-$1.5, buy orders for over $200k were created over the price of $10.
Read 13 tweets
Jan 30, 2023
A lot of (probably most) the crypto exchanges produce fake trades that count into the overall turnover in order to move the exchange up in volume rankings. How really famous exchanges do it? How we can see it?

🧵🧵🧵

#trading #cryptocurrency Image
What do I mean by fake trade? It is a trade that you, as an other player in the market, cannot participate in, because it is an exchange's trade with itself. If you are not able to participate with this trade, it should not be included in the overall turnover.
Unfortunately, it is how a lot of exchanges promote themselves in rankings where they fight with tons of other exchanges. How can we spot it?
Read 8 tweets
Jan 26, 2023
Recently, I watch @LomahCrypto videos. What is visible, is that he almost always trades hot coins + BTC/ETH. What I wanted to check is if staying with top performers is typically good for you or not as a trader.
🧵I think the results with be insightful for everybody.🧵

#trading
I divided my data into two periods:

- First 10 days of 2023
- Rest of 2023

Data consists of all the Binance Spot instruments with quote currency in USDT and BUSD.
Firstly, I wanted to check the relation between price change in the first and second periods. You can see that the relation is good for us - better coins in period 1 are better in period 2. Unfortunately, we have 2 outliers that make our model bad (GALA and LDO) Image
Read 9 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!

:(