The stock market is at record highs, and that’s great for investors—unless, as some commentators insist, it’s bad for investors.

The fact is that it isn’t easy to get a handle on what the stock market is telling us. On Monday, the S&P 500 index of U.S. blue-chip stocks reached an all-time high, as investors bet on our economy as an island of stability in an unsettled world.

Pessimists point to stocks’ new highs, seven years into a bull market, and warn that what has gone up will soon come down. But warnings of a recession and a bear market have been ringing out for several years now, without results. In my experience, it will take a major event to reverse the market’s upward trend.

Brexit sent a brief shudder into the market, but wasn’t enough to derail it. Neither were low oil prices, a slowdown in China, the Greek debt crisis or a host of other nasty events. Reversing the trend of rising stocks will require something more serious, such as the default of a major country, or a decision by the Federal Reserve to raise interest rates in a slow-growth environment.

Neither of those scenarios appears to be in the cards right now.

The S&P has gained more than 16% since February, bolstered by signs of strength in the U.S. economy, recovering oil prices and the Federal Reserve’s decision so far to keep interest-rates low. The United Kingdom’s June 23 vote to leave the European Union has also created uncertainty about the region’s economies and strengthened the appeal of U.S. stocks. Furthermore, rock-bottom bond yields in the U.S. and abroad have made stocks a more attractive alternative.

If the record-high stock market continues to climb, that won’t necessarily help most Americans meet their budgets. Real wages haven’t budged in a decade, even as housing and other costs have risen. Many Americans can’t really afford their homes or their cars.

But our long, uneven bull market has certainly been helpful to investors. While we don’t know when it will end, we do know the best way to position our investments. The key is to buy high-quality, dividend-paying companies at reasonable prices. Those dividends mean you’re being paid to wait until the stock price appreciates. This approach often results in the best returns, but patience is always your best ally.

Warren Buffett has summed it up nicely: “The stock market is a device for transferring money from the impatient to the patient.”