Momentum Investing
An active investment strategy on India’s mid-cap and small-cap stocks
Introduction
The motivation for me to explore this investment philosophy, which has been around for years was Gary Antonnaci’s Dual Momentum Investing. I read this book in late 2020 and was introduced to the idea of momentum. At first, it seemed like a risky and high churn strategy which isn’t ideal for a retail investor but the way complex ideas are presented intelligibly in this book made me explore this strategy with some of my own capital and alter it to be suited for a short term investment horizon. I formulated a simple algorithm to pick stocks for my portfolio and allocated a small capital to it. The algorithm was ready by 1st January, 2021 and it was live by 4th of January. The algorithm would just pick stocks for me and advise me on which one’s to exit, all the trades are still executed manually. Within the first few months, I was very impressed with the performance and went back to rewrite the code to make it more accommodating of the market risk. After a few code alterations and fixes, the drawdowns realized by this strategy were also lesser compared to the market, despite being a high risk strategy.
Perhaps the biggest difference between the book’s strategy and mine was the time horizon. The parameters to look for in such stocks had to be changed keeping in mind the shorter time horizon. While Antonacci’s book is fixated on a strategy with a yearly re-balancing in high momentum stocks, I was running this algorithm bi-weekly and rebalancing the portfolio weekly only on the algorithm’s recommendations, thus making my decisions purely quantitative. It happened often that I was investing in firms that I had no idea about and what business they were in.
Going just by the results, I was impressed by the 112% returns I had on my initial investment on 31st December, 2021 (1 year) while the NIFTY50 (India’s benchmark index) and S&P500 returned 24.99% and 27.92% respectively. Yes, take these returns with a grain of salt.
In all fairness, I started this project during one of the best bull runs in the history of equity capital markets. It was more difficult to not make many profits in those markets. But an outperformance of such a degree made me document this strategy for my own future reference. All broad indices (NIFTY, SENSEX, S&P500) have had stellar returns in 2021. The indices from which the algorithm picked stocks from — NIFTY MIDCAP and NIFTY SMALLCAP themselves returned 45.31% and 59.11% over the same year. I also understand past returns are not an indication of future performance.
Personally, I’m not a fan of looking at charts to make decisions or any sort of technical analysis for that matter. All decisions made by this algorithm were purely quantitative and the charts that are shared here are all looked at in hindsight.
Introduction — What is Momentum?
The first academic mention of momentum was in 1993 in the paper by Jegadeesh and Titman titled — ‘Returns to buying winners and selling losers: Implications for stock market efficiency’. More modern and popular take on this strategy was penned by Clifford Asnes, Hedge Fund Manager and Co-Founder at AQR, a highly aspirational hedge fund. The first paper is perhaps the first detailed momentum strategy with different holding periods from 3 months to 12 months along with their historical back-test returns. Second paper by Cliff talks about myths around managing a fund that is momentum themed.
Momentum in stocks, simply put, means the outperformance of certain stocks compared to their peers in an index (or a sector). These high momentum stocks have a higher probability to outperform in the near future. It is counter-intuitive to the traditional ‘buy low and sell high’ strategy and promotes ‘buy high and sell higher’. For a stock to go from $100 to $500, it has to go through $200, $250 and that’s when you take a long position in these securities with hopes it would go higher. This strategy on paper seems very unintuitive and risky, but backtests over a very long range of data by various researchers has proven this strategy to be effective.
Why does momentum work? There are few theories which pin the cause on risk and psychology. Risk based because your returns in momentum are higher than the market because you’re accommodating more risk in your portfolio. Psychology based because good past returns of a smallcap, midcap stock would lead to more analysts covering it and create more demand by both, the retail and institutional investors.
Gary Antonacci’s Dual Momentum Investing, as the name suggests, discusses on two kinds of momentum -
i) Absolute Momentum — It compares the price of security against its own historical performance. A stock with high past returns over the years would have a high absolute momentum rank.
ii) Relative Momentum — It compares the price of the security against its peers in the index or a sector. Suppose there are 2 companies A & B with returns 10% and 25% respectively. A’s relative momentum rank would be higher and hence, it’s weight in a momentum portfolio would be higher.
To screen these high momentum stocks, I was looking at the following factors while screening stocks.
- % Away from 52 Week High
= 1 — (LTP/52WeekHigh) x 100
Where LTP is the last traded price. 52WeekHigh is the highest value the stock reached in the last 52 weeks. A stock closing in on an all time high has more probability to scale newer highs. But at the same time, it may also fall off it’s peak. That’s what makes this strategy a high risk strategy. The other factors mentioned below allow us to predict it better (to some degree).
- RSI — Relative Strength Index
RSI is one of the most popular momentum indicators which determines the overbought (>70) and oversold (< 30) zones of a security. RSI is calculated by : 100- (100 /1 + RS)
Where, RS = Average of x days’ up closes /Average of x days’ down closes
I have been using RSI-Exponential 14D — A data point readily available for all securities. RSI exponential is calculated using the exponential average close price of the stocks, which is similar to the moving average but a higher weightage is given to the more recent days, given the short term nature of this model.
- Trading Volumes
5/20 % Volume : This data metric provides the difference between 5 days and 20 days average volume of the security. I’d ideally look for stocks with higher buying in recent times. This has often lined up with excellent earnings results or news breaking out in favor of the security.
This stock saw a lot of heavy buying around May 2021, marked with the circle. This change in volume from the past few weeks was picked up by the algorithm and a ‘Buy’ signal was given out by the algorithm. This stock rallied for the next couple of months and has been a highlight of this portfolio with about 72% realized gains in 25 days.
Open Interest : Open interest is a number that tells you how many futures contracts are currently outstanding (open) in the market.
Future Volume : This refers to the total number of future contracts that have been executed on the stock exchange on any given trading day. A change in weekly future volume would help us look at the interest among investors in a certain stock. Rise in price accompanied by an increased open interest and volume traded is considered a bullish signal. Conversely, falling prices, open interest and volume is considered a bearish signal by the model.
- RSPM
Relative Share Price Momentum — This is the % change over the last 6 months in one month moving average of the share price, relative to the benchmark index. This is an excellent measure of relative momentum of the stock.
- Absolute Returns
Absolute returns of the stock over different time horizons (1M, 3M, 6M, 1Y, 3Y, 5Y) are used to calculate the absolute momentum rankings of the securities.
Tata Power (see chart) would be an excellent example of a strong contender with high absolute returns. This stock returned about 36.67% in the year of 2020. Went on to return 57.85% in the first half of 2021 followed by another 80% in the second half of 2021 (see figure). These returns made the algorithm give a signal to long this stock at several instances through the duration of the project. Upon further exploration on why this stock performed so well, it was later found out this was India’s stock that was driven by the EV hype worldwide. Tata Power is working on infrastructure support for the EVs.
- Sharpe Ratio
Few weeks into this algorithm, I realized a momentum portfolio was a rather high beta portfolio. The average sharpe ratio of the picked stocks was high. Ignoring high sharpe ratio stocks would be a blunder and added it as a parameter for my algorithm to pick stocks in the first few weeks itself. The sharpe ratio adjusts the asset’s past performance for the excess risk that was assumed.
- Price Momentum Ranking
I’d calculate the price momentum ranking for the stocks in NIFTY MIDCAP 100 and NIFTY SMALLCAP 100 companies using the absolute and relative momentum parameters. I’d only long companies with a high price momentum ranking along with the combination of other factors mentioned above.
- Number of days to next earnings call
This parameter is an underweight parameter due to it’s highly speculative nature, but it is still something I like to look at. A spike in volumes and RSI with a looming earnings call works towards a buy signal for this model. Converse would be true too. This could be a hint towards a healthy earnings call and EPS beat.
A simple DATEDIFF command returns you the number of days to the next earnings call.
Stock Universe — NIFTY Midcap and Smallcap
The motivation to select these 2 stock universes were the attractive returns of the Smallcase products focusing on the momentum strategy, especially in the Smallcap and Midcap universe. Smallcase is a relatively new product in the Indian Markets. A smallcase is a basket of stocks that can be either passively or actively managed. The ownership of these shares remains with the retail investors as opposed to a mutual fund house taking the ownership of the shares for the investors. The investors get regular updates on re-balancing/altering their portfolios through notifications which is usually one click. The common intuition of Smallcaps or Midcaps having more potential for growth than blue chips was another motivation to select this universe.
As the name suggests, both indices represent 100 companies each from the midcap and small cap sector, calculated using the free-float market capitalization method. Together, they both represent only 13.2% of free float market capitalization of the tradable stocks listed on NSE (National Stock Exchange) as on March 2019.
Datavendor — Tickertape Pro
This entire project was heavily reliant on Tickertape, a financial data vendor based in India, backed by India’s biggest brokerage house, Zerodha. All the parameters described above, for the 200 stocks, were downloaded in .CSV format twice a week to run midweek and weekend checks on new stocks and already holding stocks.
The customizable saved screens would let me export data on one click and my algorithm would take it from there to filter out and recommend stocks.
It is also interesting noting that an annual Pro membership cost me just about $16 and gave me access to unlimited pulls of data. This along with a low cost brokerage kept the trading expenses to bare minimum (despite being a high churn strategy) as opposed to high fees charging momentum funds that are available.
Ticket size, Exit strategy and Risk Management
At any given time over the last year, I held not more than 8 stocks in my portfolio in order to not over-diversify the risk. I also capped the ticket size of each long position to 12.5% of the total so that I wasn’t overweight on any stock at any point. If there weren’t eligible stocks to long at a certain time, the balance capital was kept as cash in the portfolio.
This cash position and strict ticket size allocation has avoided any major drawdowns. As a matter of fact, it has hedged the risk during drawdowns which you’d find in the next section.
Exit strategy was fairly rudimentary till this stage. I’d simply exit a stock when it failed all the set momentum parameters for 2 consecutive algorithm checks or hit a pre-decided, fixed stop loss. Whatever happened first. I’d say an elaborate exit strategy is still a work in progress for this model.
Results: Returns, Drawdowns and Peer Performance
All the indices saw an excellent rally over 2021, so we know this algorithm works well in the raging bull markets. However, when things slowed in the last Quarter of 2021 with the fear of FED Tapering and quantitative easing planned in the near future, all global markets faced a slowdown compared to the rally in the first 3 quarters.
The algorithm picked that up and advised going in on fewer stocks and portfolio went from 100% equity to about 60% to 30% equity and rest in cash for the last quarter. This advice by the algorithm let this portfolio experience lower drawdowns than even the indices which are heavily diversified.
The next chart is the drawdown analysis of this portfolio against the indices. This is on weekly data too.
Drawdowns are the quantitative measure of decline from a historical peak in the price of assets. Drawdowns are absolutely unavoidable and lower drawdowns are preferred in actively managed portfolios. It’s worth noting that drawdowns in the first half of the year are much higher than the market average. But after a couple of code fixes in the following months along with going in cash when there aren’t too many active momentum stocks, helped reduce the drawdowns over the 2nd half. But it is also worth noticing that higher drawdowns also brought in higher returns in the first half (See next table).

The maximum drawdown and drawdowns in general were lower in the second half of the year around when the portfolio started going in cash positions. The overall markets too returned lesser in the second half of the year compared to the first half.
This momentum portfolio certainly did well against the market. Now comparing it against other momentum funds in India. They were a huge motivation to start this portfolio. All of them boasted very high CAGR over multiple years but also came with high fees required to invest in them. I wanted to build a model of my own just to avoid these fees and I’m glad it outperformed them in it’s very first year. Pure luck? Probably, but I’m continuing to test this model.
The underlying assets of these funds are the same (Midcap and Smallcap stocks in India) so it is appropriate to compare their performance.
All the returns are exclusive of any fees. The data is collected from the respective fund’s smallcase page. All of these are actively managed momentum themed smallcases managed by very accomplished Fund Managers. Small Case funds are promoted to be nimble funds due to their restricted size. It is also worth noting almost all of the funds have outperformed the midcap index (without inclusion of fees).
Other Important Statistics
Naturally, this portfolio had a very high average weekly return at almost 1.5%. The best week was the week ending on 15th July, 2021 at +9.58%. The smallcap index too had a strong rally during this week (+4.2%) and the drivers of this sharp jump in the portfolio were smallcap stocks picked by the algorithm.
The week ending on 19th March, 2021 was a huge sell-off week for the markets. The smallcap index was down by almost (-3.25%) but due to poor exit strategy, the portfolio had it’s worst week with -7.64%. This huge drop made me underperform the market YTD (as on that date) and made me re-visit the code. A slightly better exit strategy reduced these sharp drawdowns through the rest of the year.
Here are some statistics on individual trade level :
A total of 82 buy signals were given by the algorithm in 2021 on 57 securities (multiple were repeats). 57 of these trades returned a profit while 25 returned a loss for a win rate of 69.51%
The average return per trade was 6.54% over an average holding period of a stock at 23 days.
What’s next, for this portfolio?
I still treat it as a work in progress model as I try to accommodate different parameters and test out different exit strategies. I still have a lot of plans for this model, here are some of them -
- Completely automate the model to collect data on daily level — Currently, the data is on a weekly level for the fund performance. That’s because to a certain degree some of the logging is still manual. I wish to automate this model completely using Selenium (python package) and collect data on a daily basis to understand the volatility and risk of this strategy.
- Replicate this model for US Small Caps and Mid Caps (already live). On 21st January, 2022 — I deployed this model on US stocks in the S&P400 Midcap and S&P600 Small cap indices. It’s a 5 times wider universe of stocks to select from than the previous one (1000 against 200), but so far I’m again impressed with the model’s performance despite markets being extremely volatile at this time (Fed rate hikes speculations, Russia’s invasion of Ukraine, High inflation). I shall be posting a similar update in 2023.
- Record more data on cash % in the portfolio, response to change in VIX, number of entries and exits. I have recently started logging on how this model responds to different phases of the market and increased volatility. I’m logging what percent of the portfolio goes into cash when there’s spiked volatility and how many trades it is suggesting to me during such times.
- I’m exploring the idea of algorithmic trading to make it a fully automated model, but I’m still very skeptical about it. I wish to generate a parallel back-test model in the coming months which would trade automatically and compare its returns with my model over the same time period.