Picking the right stocks in a particular sector is obviously important. However, investing in the right sectors at the right time can have an even bigger impact on returns. In the words of Warren Buffett: "A rising tide lifts all boats".
Even a mediocre stock can deliver substantial gains when the sector is booming. Conversely, when a particular sector is struggling, even the best names in such a sector tend to deliver disappointing returns.
Momentum is a pervasive force in the stock market, meaning that winning sectors tend to keep on winning over the middle