I often say that it is a market of stocks and not a stock market.
Even the greatest company can be overvalued and therefore a bad investment. Therefore, thinking in generalities like the stock market is a mistake. Lesser quality companies can be superb investments over the long run if their valuations provide the opportunity.