How we built algorithmically traded systems 2 years back and their performance so far
Back in 2019, Abhishek and I experimented to building systems that traded fully automatically (at least with minimal human inputs). This article is about how the journey was so far.
Abhishek wanted to be a trader and was researching strategies in late 2019. By then, I have experimented with algo-trading in the summer. We happened to meet once and when we discussed what each of us was experimenting with, we felt we could combine our skills and knowledge to build algo-trading systems. Abhishek was manually testing his strategy with historical data. I thought we could automate this and quickly try for 5 years and see the consistency of the strategy. I wrote some code quickly and tried backtesting. We got really good results. It was something like this. The graph represented the historical profit the strategy would have made.
Of course, this failed in live trading 😆😆. The graph was too good to be true. There were some bugs in the backtesting code 😝. It took us about 2 months to find out that what we worked on so far is useful. Nevertheless, it did not discourage us and we continued researching, backtesting and improving the code base as went ahead. In the past 2 years, we found 3-4 strategies that are performing reliably (at least till now) and we have had our share of blows. The below infographic should summarise their performance in 2021-22 FY.
Strategies
We are currently running 3 strategies in live trading and a few experimental strategies. These 3 strategies are different from each other, hence less co-related which helps us diversify our risk. Two of these strategies are in the Indian F&O category and one is a crypto arbitrage strategy. Below are more details on how they faired in 2021-22 FY in live trading.
Strategy 1 - Trend following on one of the Indian indices. This is a directionless strategy and trades in both bull and bear markets.
Strategy 2 - Options strategy on the Indian indices. Like the above one, this is also directionless. These 2 strategies run in fully automated mode and require almost no human interference.
Strategy 3 - Crypto arbitrage. This is a fairly risk-free strategy. Unlike the above 2 strategies, this needs active management to keep updating its parameters. The chart is a summary of net P&L month-wise.
One that failed
We also had a 4th strategy that failed miserably. It gave exceptionally high returns in 6 months and ate all the returns in 1 month. Fortunately, we did not have a loss and managed our risk well. Just look at the end of the chart 👀. A good challenge for an adventurous hiker to climb the mountain. The chart is for over a period of 8 months in 2020, April to November.
Learns learnt:
Be sceptical about something that is performing too good as well, not just the ones that were failing
Always be ready to handle the downside of a strategy. Know when to stop trading.
Do not scale the system too early
Learnings and ideology
With all the experience in 2 past years, these are the principles I keep in mind while designing strategies:
Simplicity: Simple strategies are easy to design, understand and perform well. And are likely to be not over-fit.
Reasoning: At least I think there has to be a fundamental reason behind why a system would work. Combining any random indicators to design a system that gave profit in the past is likely to fail if there isn’t a good fundamental reason on why they might work. E.g. A trend following system could rely on the factors that at least a few days in a year the market will make big moves that could compensate for every loss the system made on other days
Consistency: I strongly believe in building systems that worked historically well and continue to do so in the same way in the future. Systems that deviate significantly from the past performance may not be a good idea (even if they gave really good returns, they can give heavy drawdowns too). This is what I follow based on my risk ideology.
Conclusion
We always live by questioning the future. Never is past performance an indicator of the future. Strategies can always fail miserably in the future and we try to be ready to take the blow. We are taking small steps but calculated steps. As we go ahead, we want to build more strategies with less co-relation in different markets (Indian equity, crypto, and is possible in US markets too). We plan to expand our team, and our infrastructure (e.g. better risk monitoring tools) and expand our knowledge as we good ahead. Wish us all the best. In markets one really needs it 🙌🏻.