I use IBKR for data, but you could also get ticker data from Yahoo Finance or other similar sources, albeit manually since they don't have an API afaik. A simple although simplistic way to backtest ideas like this is Portfolio Visualizer [0], you need an account, but a free one should work. I've uploaded a screenshot of a sample run where the top company in SP500 was held for a year and then swapped out if needed on an annual basis [1]. There's a few things I'd like to highlight.
Firstly, for a considerable majority of history, often for years at a time, holding the top one company, I'll just call it SP1, underperforms the index. The maximum downturn for the SP1 was 79% and I think very few people could stomach holding that for years at a time, hoping things will improve.
Secondly, pretty much the only reason the SP1 strategy comes out on top is the fact that AAPL has gone up about ten times (!!) in the last decade or so. Whether that's the new norm in the markets or an absolute anomaly I'll leave up to you. In short, the only real reason the SP1 strategy has looked favorable, and I suspect the same holds for the SP10 and SP50 if you backtested them, is that Apple has seen its value skyrocket.
Needless to say that none of this is investment advice etc.
Firstly, for a considerable majority of history, often for years at a time, holding the top one company, I'll just call it SP1, underperforms the index. The maximum downturn for the SP1 was 79% and I think very few people could stomach holding that for years at a time, hoping things will improve.
Secondly, pretty much the only reason the SP1 strategy comes out on top is the fact that AAPL has gone up about ten times (!!) in the last decade or so. Whether that's the new norm in the markets or an absolute anomaly I'll leave up to you. In short, the only real reason the SP1 strategy has looked favorable, and I suspect the same holds for the SP10 and SP50 if you backtested them, is that Apple has seen its value skyrocket.
Needless to say that none of this is investment advice etc.
[0] https://www.portfoliovisualizer.com/backtest-dynamic-allocat...
[1] https://ibb.co/st8mmq0