Sarthak Handa

@sarthakh330

Pathway to Algo Trade Cryptocurrencies

Why crypto-trading is a big deal, strategies that helped me make ‘Ƀ’ even in last 7 months of market slowdown, and some invaluable lessons learned along the way.

Photo from here

Why is algo-trading on crypto-assets a once-in-a-decade opportunity?

Every decade has seen a new market open up for public trading, be it — commodities, stocks or crypto-assets. All these markets showed high volatility in their initial years as the markets were less regulated, trading volumes were low, and futures trading was still nascent. Crypto market is still in its hay days and it shows 10x more volatility than its other mature counterparts. High volatility leads to higher highs and lower lows in prices, which means bigger gains if you ride the wave right.

To algo-trade in stock markets, one has to buy proprietary software, get permissions and pay for historical data to test Algos, which is a significant barrier to entry. Most crypto exchanges, however, provide simple open APIs for trading. So even a college kid can set up a rig, execute Algos and make money purely on his/her intellectual capability.

This level playing field, to me, is mind-blowing!

Excelling in mature markets requires both a good strategy and a fast hardware processor that can execute right trades in milli-seconds. Crypto market, however, is so nascent that even old textbook trading strategies running on simple PC machine give handsome returns.

So how do people trade cryptos?

Photo by rawpixel on Unsplash

Traders take one of the three approaches:

  • Fundamental Analysis: Investment in crypto-assets are evaluated based on the crypto-project’s progress, tech fundamentals, market scope and team strength. For example, a crypto-asset that doesn’t have a real product in market will fundamentally rank as a poor investment choice, even if it manages to get listed in top 10 crypto-currencies by trading volume.
  • Sentiment Analysis: Some traders parse sentiments via reddit, twitter, futures market etc, to find hot trading opportunities. A trader, for example, can pick up the news of a crypto-asset getting listed on a big exchange, and perform trades, pre-judging the news’ impact on sentiments and prices.
  • Technical Analysis: When prices of a crypto-assets vary, so do the 100 odd Technical Indicators (like Moving Averages, RSI, MACD) which provide a hint on probable future price movement. Traders love it. So do I. (More on it below.)

This is more powerful than you think. These three pieces of information clubbed together can give incredibly useful triggers on when to enter and exit the market. For example, following can be one strategy.

MACD and RSI are Technical Indicators that quantifies DIRECTION and VALUATION aspect of the crypto-asset. It’s okay to not know what they mean for now.

This strategy alone beats the market on any given interval of 2+ months over last 1.5 years for most prominent crypto-assets — sometimes by a huge margin.

Note: here are two excellent reading resources for Technical & Sentiment Analysis.

My approach for gaining edge in the market?

The idea of making capital with statistics fascinates me! I focus on finding hypothesis and trends that I can validate in the market and then automate via algorithm — so that a piece of code can make money for me even when I sleep.

Photo from here

Let’s take the example of a trading Algo strategy that I conceptualised, tested and deployed in last 7 months to better appreciate the entire process.

Hypothesis: If price of a crypto-asset falls “unreasonably low”, it will have high propensity to bounce back.

We will get back shortly on how we define this “unreasonably low” threshold. For now, observe that the graphs below clearly show how the prices of crypto-assets jump back when they fall below a threshold line. If this were to be a consistent pattern then we are onto something! We just have to buy a crypto-asset when it’s price falls below the threshold and sell it back when prices increase in the next instant!

Box plot representation of prices. Observe that prices rise back when they fall below the green line!

The threshold in the graph above is drawn “2 std. deviation below the moving average”. Let’s quickly see what it means.

STATS 101: The 2 standard deviation deal

Bell Curve (Gaussian Distribution)

Any perfectly random variable follows the bell curve, which has an average value at the peak and a std. deviation that defines the spread of the distribution.

96% of the data points lie within 2-std. deviation above and below the average value.

By symmetry, the probability of the value dropping lower than ‘2-std. dev. below the average’ is less than 2%!

Crypto-asset prices are not perfectly random, but if they fall lower than ‘2-std. dev. below the average’ then there is a high chance that they will rise back towards the average value soon. At least the price graphs, shown previously, confirmed the same.

Approach:

Hypothesis always starts like this. It’s a hunch. You visually verify the trend on price graphs. If it looks convincing, you validate your hunch by creating an algorithm and back-testing it on different crypto-assets for different parameters.

I ran the Algo on different time interval (5m, 15m, 30m, 1h) and different threshold value (2.0 sigma, 2.2 sigma, .., 3 sigma) for 50 crypto-assets to evaluate which particular combination gives high count of trading signals without compromising the profitability per trade.
Process for building the algo trading strategy

Once the parameters are optimised, you make the Algo live with real funds, monitor the performance metrics (profits, slippage, Sharpe Ratio etc) and eventually scale the funds allocated to the Algo trading strategy.

Lessons

More than the profits made using this strategy, I gained some invaluable perspective over the last 7 months of algo-trading in a turbulent market:

  • Trading algorithm that works well today will most certainly saturate in next 6 months and won’t remain nearly as lucrative.
  • Algos that work well on $10,000 will cease to be nearly as useful when your trading-fund size increases to $100,000.
  • The harder an Algo is to conceptualise and code the more defensible it is.
  • Most Algos have a correlation with the market, i.e. some of them do well in a rising market, while others do well in a falling market. It pays to have a portfolio of Algos of each type to save the downside risk on either side.

Algo trading is a constant game of one-upmanship. The markets never sleep. It keeps evolving. A trader loses the edge if he/she stops innovating newer trading strategies. It’s a massive open opportunity.

Tap right in, if you have a taste for such things!

Other Resources:

Thanks for reading! :) If you liked it, please support by clapping 👏🏻 and sharing the post.

Feel free to leave a comment or connect with me on LinkedIn.

More by Sarthak Handa

Topics of interest

More Related Stories