Stocks just reached a tech-bubble era milestone. Who cares?

On Monday, the Dow, the S&P 500, the Nasdaq, and the Russell 2000 each hit an all-time high on the same day.

The last time that happened?

December 31, 1999.

Stock market historians will remember that this final trading day of the millennium came just a few months before the beginning of the tech bubble bursting and the beginning of a US recession.

The resulting crash would see the Nasdaq lose about 80% of its value peak-to-trough and even become the market famously linked with the idea that investors had been taken in by “irrational exuberance.”

Naturally, many investors are likely to be spooked by any bit of “since 1999” data given what followed that event. So is now a time to worry about stocks?

Well, it depends what you mean by worry.

Time is your friend

If there’s one lesson we’ve learned about the stock market in the weeks since Donald Trump’s election, it’s that the easiest way to help yourself as an investor is to stay invested.

Timing the market is likely to be a losing effort for the average investor, as the market will move further and faster than you can react to in a cost-effective way. For the average investor, then, it is about time in the market rather than timing the market that leads to long-term investing success.

But if by “worry” you mean “sell,” then no, all-time highs are, on their own, not a reason to sell stocks.

The long-term arc of the stock market is up and to the right. Over time, the collective earnings power of the large swath of American businesses captured inside indexes like the S&P 500, the Russell 2000, or popular mutual funds like the Vanguard Total Stock Market Index Fund, will increase.

Of course, some will argue that the “Trump rally” we’ve seen since the election has pulled forward stock market gains from next year or already priced-in a supply-related increase in interest rates in the bond market. Stocks also remain near the high end of their historical valuation.

But the long-term investor need not worry if a 5% rise in the S&P 500 takes place during a brief two-month period or a longer one-year period. Over time, again, stocks have tended to go up.

Source: JP Morgan Asset Management
Source: JP Morgan Asset Management

The Buffett view

Writing in Fortune on Tuesday, Carol Loomis reprised a stock market prediction from Warren Buffett made in 1999 that stocks would return about 6% a year over the next 17 years. The S&P 500’s annualized return was about 5.9% over that period. Pretty good, but about half what many investors back then expected.

But even this relatively disappointing period for stocks — in which investors endured two recessions and brutal bear markets — was still a broad success for investors that enjoyed the full benefit of those 17 years.

Buffett declined to make a prediction about the next 17 years, saying only that a low-cost S&P 500 fund will beat government bonds, “do-nothing” investors in aggregate will beat high-charging professionals, and high-charging professionals will still get rich underperforming indexes.

In other words, count on the US economy improving and stocks benefitting. Invest accordingly. And cheaply.

“Let me be clear on one point: I can’t predict the short-term movements of the stock market,” Buffett wrote in 2008.

“I haven’t the faintest idea as to whether stocks will be higher or lower a month — or a year — from now. What is likely, however, is that the market will move higher, perhaps substantially so, well before either sentiment or the economy turns up. So if you wait for the robins, spring will be over.”

Buffett wrote these words in October 2008 hoping to bolster the confidence of a scarred American public that had just seen Lehman Brothers collapse and financial markets tank. Now, in November 2016, markets are at record highs despite a surprise political outcome and a deeply divided public.

Eight years ago Buffett counseled that waiting for things to get better would lead one to miss the cycle’s turn.

Alternatively, fearing record highs and waiting for things to get worse will leave investors similarly wrong-footed.

Myles Udland is a writer at Yahoo Finance.

Read more from Myles here; follow him on Twitter @MylesUdland