Author: shyam

Simple Trend-following

Our introduction to trend-following posts on Zerodha Varsity (Part I, II, III, IV and V) used tradfi instruments to build a basic model. What if we applied the same principles on crypto assets?

To keep things simple, we’ll pick only two assets: BTC and ETH. The portfolio is evenly split between the two. Since crypto markets are 24/7/365, we’ll divide each day into 24 hour slots and construct a daily series based on the closing prices at each hour. The portfolio is further split into 24 parts each. Each position is an average of a binary trend signal.

Individually, trend-following boosts the Sharpe ratio of each asset.

You may not have captured the absolute highs but you would have avoided the steep drawdowns.

They are stronger together than individually.

Needless to say, leverage in this scenario would be fatal.

Code on github.

The Hyperliquid DEX

Hyperliquid is probably the most hyped DEX (decentralized exchange) right now. The advantage the CEXs (centralized exchanges) had was in the “ease-of-use” area, especially in the on-boarding and trading APIs front. Hyperliquid tries to marry the convenience of a CEX and the benefits of a DEX.

We downloaded their historical order book to check the spreads and depth of popular coins.

BTC, ETH and SOL are a world apart – tight spreads and deep books.

However, trading the less popular coins needs some care.

Zooming into the spreads brings out the difference between the top-tier coins (BTC) and the rest (PENDLE).

The ranges look decent if you are trading a retail-sized book.

Intra-Stock Correlation and Momentum Returns

Vojtko, Radovan and Pauchlyová, Margaréta, How to Improve Commodity Momentum Using Intra-Market Correlation (SSRN) discusses using short-term and long-term correlations between constituents to bet on momentum and reversal.

Since we are always on the lookout for strategies for reducing momentum drawdowns, we did a quick check to find out if a similar strategy can be used for long-only momentum.

The rule is fairly basic. Using the momentum portfolio already formed, if 20-day average correlation between them is greater than 200-day average correlation, then go long, else, go to cash.

Ignoring transaction costs, it looked like it avoided the brutal 2018-2019 drawdown. So, we dived a bit deeper to see if it was materially better than our 50-day SMA idea.

Here, COR_RET represents using only correlations to go long/cash, SMA_RET represents using only SMA, EITHER_RET is correlation or SMA and COMBINED_RET is correlations and SMA.

Going long if either correlations or SMA (EITHER_RET) seemed to be a winning strategy. However, high transaction costs in India can turn any decent strategy into a loser in a heartbeat.

25bps in transaction costs negates most of the advantages of considering the correlation signal. However, the post-COVID data does point towards EITHER_RET outperforming SMA_RET.

The biggest disappointment for us was that there was no improvement in drawdown metrics but 5% of outperformance might be worth the additional complexity.

Code and charts are on github.

The High Volume Return Premium

Gervais, Simon, Ron Kaniel, and Dan H. Mingelgrin, 2001, “The high‐volume return premium,” The Journal of Finance, unearthed a market anomaly quite similar to momentum where stocks that traded with a higher than average volume went on to give higher returns.

We did a quick test on the top 200 stocks by free-float market cap on the NSE between 2014 and 2024 to check if it makes sense to pursue this further.

A long-only strategy that rebalanced once a month with a 50-day reference period underperformed the NIFTY 100 TR index by a wide margin until the August of 2023. Nine years of underperformance vs. a year of parabolic liftoff doesn’t really speak to the stability of the anomaly.

We’ll look for further publications in this area and report back. In the meantime, you can read the paper and have a look at our code here: github.

Commodities vs. Commodity Stocks

Trading commodities is not the same thing as trading commodity stocks. Commodity stocks, especially in partially-open economies like India, have their own cadence.

Take aluminum, for example. If you compare the MCX Aluminum Index with National Aluminum stock, the stock has vastly outperformed the metal.

While there is something to be said about the stock being more volatile than the metal, the difference is returns is night-and-day.

Stocks are evaluated on the basis of free-cashflow, earnings growth, return on capital, etc. While the prices of metals if mostly determined by short-term demand-supply imbalances.

Generally, Indian metal stocks have vastly outperformed the metals themselves.

If the government has erected tariff barriers to protect certain domestic industries, it makes no sense to try and link commodity prices to producer prices. Going back to our example, there is zero correlation between the monthly returns of aluminum vs. the monthly excess returns of National Aluminum (over the NIFTY 50 TR index) on any time frame.

Trading metals is completely different from trading metal stocks.

Code and charts on github.