We all know the basic momentum strategies:
Moving average crossovers
x period returns above some threshold
etc.
While those still tend to work they aren’t all that informed.
You’ve probably heard me say this like 50 times before but I’ll repeat it again:
You want to trade a clear cause and effect. What caused this price move and why should it keep going? You are supposed to ask yourself that question.
Table of Content
Reasons for Momentum
Which can we detect?
Regimes
Google Trends Data
Final Remarks
Reasons for Momentum
There are a number of different explanations for why we see momentum in prices.
Here are some:
Herding Effect
You have people following the trades of others. Pump and dumps are a fantastic example.Liquidity Imbalance
Lower liquidity on one side of the book makes it easier for price to move in that direction.Large Limit Order Disappearing
Whenever there is a large limit order you will also get a lot bigger taker orders trying to take advantag of this added liquidity. When this liquidity suddenly disappears though some taker orders will be to slow and still execute without this large limit order causing lots of slippage.
Slow Diffusion of Information
Not everyone reacts to information equally quickly.
When new information comes out the first ones to react are usually institutions and then retail traders.
This will (theoretically) cause the following price move:Liquidation Cascades
Liquidation cascades happen when you have a large liquidation that moves price in one direction causing even more liquidations that keep moving price in one direction.
Which can we detect?
Of those 4 there are some that are pretty easy to detect and some not so.
Let’s start with Herding effects:
We can’t just look at a price chart and know if a move happened due to herding BUT we can look for events that will cause herding elsewhere.
One example would be to participate in pump and dump groups (The legality of which isn’t all that great). Another one would be to scrape social media sites like Twitter and react to big accounts talking positively about some coin.
Next is liquidity imbalance:
This one is possible to detect. We just need to look at liquidity in the book.
I have an article that goes over how to plot this liquidity throughout time:
Large Limit Order Disappearing:
Another one that’s easy to detect. There is even a form of market manipulation called “Momentum Ignition” that’s based on this effect.
Slow Diffusion of Information:
We get this whenever there is new information in the market so you detect this by measuring new information in the market. This is difficult to do around the clock but during some events we know for sure that there is new information: News releases.
The difficulty in trading this is being early and figuring out when the information is priced in and you can close your trade again.
Liquidation Cascades:
There is a trap with this one: Did the liquidations cause the large price move or did the large price move cause all those liquidations? (Unless you are trading something super iliquid and people got a ton of leverage on, it’s probably the latter)
Regimes
Another (less informed) way to trade momentum is using regimes.
We assume that there are market regimes where price tends to trend and market regimes where it doesn’t.
Now I wouldn’t just go out and blindly try to figure out if a market is trending or not via something like a Hidden Markov Model (HMM). That would be pretty uninformed again.
Instead I segment my market into regimes using metrics that are related to some of the reasons for momentum that we discussed above.
For example:
I could have some metric that measures the amount of people talking about some coin, for example $WIF.
When there are a ton of people talking about then herding is more likely to happen and trending behavior becomes more likely.
I never looked at that data myself before but I assume it’s either roughly lognormally or exponentially distributed.
We then just use some thresholds for different regimes:
In this example we have 4 different regimes.
We could now trade momentum in the following way:
Don’t trade momentum when in R1
Trade without leverage in R2
Trade with 2x leverage in R3
Trade with 3x leverage in R4
More regimes will make your pnl more consistent (you want to scale into higher alpha signals) but will also increase turnover. The same will go for what thresholds you use.
In this example there will likely be a lot of turnover between R1 and R2 so we may want to move that threshold to the right in practice to lower our turnover.
Google Trends Data
Twitter data is, unfortunately, pretty hard to come by unless you pay up.
So we are simply gonna use Google Trends data as a proof of concept.
One problem with google trends data is that it has look-ahead bias due to the way they normalize the data.
They look for the largest datapoint and scale the entire dataset in a way that the largest datapoint becomes 100.
One benefit of google trends is that we can simply download the data as a csv with one click.
Here is what the data looks like after downloading:
We are gonna modify it a little to look like this:
And now we load our data into pandas.
WIF = pd.read_csv("WIF.csv").set_index("Time")['Searches']
WIF.index = pd.to_datetime(WIF.index)
ETH = pd.read_csv("ETH.csv").set_index("Time")['Searches']
ETH.index = pd.to_datetime(ETH.index)
df = pd.DataFrame({'ETH': ETH, 'WIF': WIF})
We want to see an unusual amount of search activity so our trendiness metric is gonna be: WTF Searches / ETH Searches.
df['metric'] = df['WIF'] / df['ETH']
Looks like WIF searches outweigh ETH searches seasonally, peaking at midnight UTC.
Final Remarks
This is where you start doing your research now!
Write a script to collect a bunch of data from google trends instead of just a week, see if trading at different thresholds changes the performance of a baseline momentum strategy, measure if a market is trending or not and see if this measure is correlated to our metric, etc.