Getting started with a Momentum Algorithm on NSE 500 Stocks

Disclaimer: This post and all related posts on Stock Selection are purely academic in nature and are not to be executed as buy or sell decision. For stock market related actions, do consult a SEBI registered advisor. I am not a registered SEBI advisor and like I said earlier, this post is a merely for educational purposes. I am a Software professional and playing around with Data and finding patterns in them interests me.

I have been studying a momentum algorithm for a while and a friend of mine asked me to write a few posts about it on the blog (he has been pushing me to write often here, if not for anyone else for him).

Methodology being followed for Stock selection and Ranking:

  • My universe for this exercise is Nifty 500. So at any point, if a stock is part of that Index, its part of my universe. If a stock moves out of the index, it gets kicked out during the next weekly rebalance.
  • From this universe, we will filter out stocks which are “Strong”. Strong stocks in my view are those (please note, here Strong does not mean Fundamentally strong) which trade above their key averages. So one way of identifying strong stocks will be to pick all those stocks from Nifty 500 universe, which are trading above their 200 day moving average.
  • Once you have a list of these stocks, it’s best to do another level of filtering. This time we will filter out all those stocks which are underperforming Nifty 100 or Nifty 200(you can take any index for that matter, broader indexes are better in my view). One important thing to note here is that you should look at filtering stocks if they are underperforming on several timeframes (timeframes here means, 1 week / 1 month / 1 year etc..). If a stock has been outperforming on larger timeframes but going through a small consolidation on a weekly basis, it might not make too much sense to get rid of it right away. But again, this is also upto the designer of the selection mechanism to decide in terms of what they expect from the algorithm.
  • Now we have a filtered list of stocks which are Strong and also not underperforming a broader index. At this point, I want to pick stocks which have momentum. Momentum for me refers to the total percentage change (absolute change makes no sense, in case you are wondering). As a smoothing factor I then divide the percentage change with the standard deviation of the stock (volatility) over a 252 day rolling window. (252 here is for 1 year). Idea here is to pick stocks that move up smoothly (with less volatility). This is a key learning from Quantitative Momentum by Dr. Jack R. Vogel.
  • Next and final step is to pick top 20 stocks and rebalance this list every week. A stock will exit this list if it falls below a rank of 35 or gets evicted from the universe (in our case, Nifty 500).

I will be sharing the output of this algorithm in form of stock picks for the week and also performance summary every week. I am hoping to learn and make this skill better along with you. Again, don’t forget the disclaimer and use this post only for education purposes.

Disclaimer: This post and all related posts on Stock Selection are purely academic in nature and are not to be executed as buy or sell decision. For stock market related actions, do consult a SEBI registered advisor. I am not a registered SEBI advisor and like I said earlier, this post is a merely for educational purposes. I am a Software professional and playing around with Data and finding patterns in them interests me.

1 Comment

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s