There's no question about it -- there are better times to buy stocks and there are worse times to buy stocks. That's because the stock market goes through very distinct bull and bear cycles.

But if you are looking for the best exchange-traded fund to buy right now, while the market is near all-time highs, you might want to hold your nose and keep it simple. Here's why Vanguard S&P 500 ETF (VOO 1.54%) could be the choice for you.

A finger flipping dice that spell out long term and short term.

Image source: Getty Images.

The market is noisy all the time

When stocks go up, it is called a bull market. When stocks go down, it is called a bear market. Most of the time, however, the market is somewhere between a peak and a trough, as the emotional pendulum swings between greed and fear. And the din of information flowing out of Wall Street is not just deafening, but overwhelming. You can't possibly digest every piece of investing news.

That's the noisy backdrop that investors have to contend with when they are making an investment decision. And it can lead to paralysis. Don't feel bad if you are a new investor and you are overwhelmed. Even old hands get overwhelmed by the task, particularly when the market is at an extreme like it is today.

Right now the extreme situation is the S&P 500 index (^GSPC 1.56%) trading near all-time highs. The S&P 500 index is the de facto index used to represent "the market," since it consists of 500 or so stocks picked by a committee to be representative of the U.S. economy. Investment legend Warren Buffett has often suggested that most investors just buy the S&P 500 instead of trying to pick individual stocks.

But surely it is a bad idea to buy the S&P 500 index when that index is near all-time highs...right? Answering that question requires a look at the history of the market. You might be surprised at the answer.

^SPX Chart

^SPX data by YCharts

The trend is up and to the right

The chart above shows the price of the S&P 500 index going all the way back to 1950. The grey sections on the graph represent recessions, which are periods when the U.S. economy contracted. You can see several different bear markets along the chart, as well. Some of the bear markets have been quite severe, including during the ones that occurred along with the dot-com bubble at the turn of the century and the Great Recession between 2007 and 2009.

Despite all of these negative events, the S&P 500 index has trended steadily higher. Not constantly higher -- there are zigs and zags, since nothing on Wall Street goes in a straight line. But the overall trend has been very clear. The S&P 500 index has grown in value over time. Even if you bought it right before the dot-com bubble burst or the day the Great Recession started, you would have made out OK over the longer term.

One of the best ways to buy the S&P 500 index is with Vanguard S&P 500 ETF. It isn't exciting at all. It just tracks the index. But it does so at a very low cost, with an expense ratio of only 0.03%, which is as close to free on Wall Street as you are likely to find. Here's the thing: If you buy Vanguard S&P 500 ETF today, you are likely to lose money over the short term.

But you aren't investing for the next week, you are investing for the next decade, or longer. And if you don't buy today, when will you buy?

Good luck timing the nadir of a bear market, as that's when investing will be most difficult because investor sentiment will be most negative. Only the deepest of contrarian investors can buy when everyone else, literally, looks like they are selling. If you are a casual investor or have any kind of personal life (like a job and a family), you probably won't be able to pay enough attention to the market to be a contrarian or a market timer or maybe even just a stock picker.

Your biggest decision will really be whether you want to invest in stocks at all. And if you do decide that investing in stocks is what you want to do, then you need to get started as soon as possible. And then stick to your long-term plan, which means keep buying stocks in good markets and bad ones.

The goal is to benefit from the long-term growth that stocks offer. And the best way to do that, particularly if you don't want to get bogged down in the details, is by starting right away and buying a low-cost S&P 500 index exchange-traded fund like Vanguard S&P 500 ETF.

Get started and keep going

It is important to reiterate the problem here. If you start investing while the S&P 500 index is near all-time highs, you are likely to lose money in the short term. But you are investing for the long term, so keep at it.

History suggests that dollar-cost averaging, which means buying at regular intervals regardless of the market environment, will leave you richer in the decades ahead. But you have to get started first in an ETF like Vanguard S&P 500 ETF or you won't be able to benefit from the long-term growth of the market.