Holding Period Impact on Nasdaq 100 Momentum Strategy Performance
The Youtube video Momentum Trading Strategy with Python! Algorithmic Trading & Stock Market Investing Tutorials! by Luke Hardy deploys a similar strategy as Algovibes albeit with a uniform holding period of 1 year and only selecting the top 5 performing.
Note that Luke Hardy also ignores the survivorship bias refered to by Algovibes. In simple terms the performance of all tickers that were not part of the Nasdaq 100 on 1st January 2013 are ignored.
With that different holding factor in mind I evaluated Algovibes cascading algorithm (Top 10 Strategy) varying holding periods, and nine cascading (Top 5 Strategy) varying holding periods against the timeframe 2013-01-01 used by Luke Hardy.
Interval | Nasdaq 100 | Top 10 Strategy | Top 5 Strategy |
---|---|---|---|
Yearly | 639 % | 822 % | 1822 % |
Quarterly | 639 % | 1239 % | 3593 % |
Monthly | 639 % | 2018 % | 2436 % |
Weekly | 639 % | 706 % | 736 % |
From the result we can deduce that Monthly holding period used by Algovibes Monthly Top 10 Strategy is 245 % more profitable compared to Luke Hardy’s Yearly holding period and 316 % more profitable than the whole Nasdaq 100 index.
However when comparing the Top 5 as used by Luke Hardy Algovibes’s Monthly Top 5 Strategy is 296 % more profitable compared to Luke Hardy’s Yearly holding period and 381 % more profitable than the whole Nasdaq 100 index.
Interestingly the best performing combination is the Top 5 on a quarterly holding period as it outperforms the whole Nasdaq 100 index by 562 %.
There must be signifant performance impact from ignoring the performance of those tickers that were introduced after 2013-01-01. There is a need to resolve this missing historical information.
Luke Hardy’s python code demonstrates an alternative method to retrieve the up to date Nasdaq ticker list and how to deal with the multi-index data retrieved by the python yfinance package.
From a programming point of view the python resample() function used in Algovibes algorithm is a limiting factor but a signifanct simplification of code complexity demonstrated in Luke Hardy’s python code. As the Nasdaq 100 stock price data is available on a daily trading day basis the resampling does not have to be constrained to calendar based periods such as weeks, months, quarters, and years. Some further exploration may identify a better performing holding period.