As many millions of people have been reminded recently, Warren Buffett, CEO of Berkshire Hathaway, doesn’t always call them right. He predicted two years ago that Hillary Clinton would both run for the presidency and win, and he never lost faith in that prospect until Election Night.

On this day two weeks later, nonetheless, it is the right time to look at a widely-noted stock market prediction that Buffett made 17 years ago, in 1999, and that is just reaching its terminal point. Here, Buffett was definitely on the correct side of the bet.

Buffett’s prediction concerned what magnitude of total returns—stock appreciation plus reinvested dividends—U.S. investors would reap in the 17 years that began as 1999 was moving to its close. Buffett made the prediction originally in July of that year in a speech he gave at an Allen & Co. conference; repeated it in several speeches over the next few months; and worked with this writer to turn the speeches into a Fortune article, “Mr. Buffett on the Stock Market,” that ran in our Nov. 22, 1999 issue. You will notice that today is precisely 17 years later.

Why this oddball 17-year span of time? It got Buffett’s attention because in 1999 the U.S. stock market has just finished two wildly different—and aberrant—17-year periods that Buffett realized could be the framework for a speech. He wanted as well to build on to the framework, adding a prediction for the 17 years that began as 1999 moved to a close.

The initial 17-year period that Buffett had in his frame of reference ran from 1964 to 1981, when stock market returns were traumatically bad: The Dow Jones Industrial Average ended 1964 at 874 and 1981 at 875. “Now I’m known as a long-term investor and a patient guy,” said a Buffett quote in Fortune’s article, “but that is not my idea of a big move.”

The simplified explanation for this aberrant investing disaster was a dramatic rise in interest rates during the period: Rates on long-term government bonds went from 4% at year-end 1964 to more than 15% in 1981. Inevitably, as Buffett spelled out in Fortune, rising interest rates exert a drag on equity prices. In this particular 17-year period, the drag was strong enough to overwhelm an almost-quintupling of the nation’s GDP, an economic indicator that normally would have been accompanied by roaring gains for the stock market.

There then arrived the second 17-year period, beginning at the end of 1981 and extending through 1998. In those years, Federal Reserve Chairman Paul Volcker hammered down both interest rates and inflation rates. In response, equities rose strongly. And so, in time, did corporate profits—“not steadily,” Buffett said, “but nonetheless with real power. “ The Dow, in that 17-year period, rose more than ten-fold, going from 875 to a stunning 9,181.

By then, unsurprisingly, most investors weren’t thinking about outliers. They were instead sure beyond a doubt that they were both brilliant at stock-picking and entitled to the riches they were accumulating. A Paine Webber and Gallup Organization survey released in July, 1999, when the Dow had added another 2000 points, found that the least experienced investors—those who had invested for less than five years—expected annual returns over the next 10 years of 22.6%. Those who had invested for more than 20 years expected 12.9%.

Well, noted Buffett, as he summed up his opinions in the second half of 1999, returns of that magnitude just weren’t going to happen. Instead, he foresaw (without using these words) a sort of reverting to the mean, in which the investing world, going forward, would be locked into the fate of the normal suspects, interest rates and corporate profits.

And here he saw a middling result. Net of the trading and management costs that investors incur, he said—implying that these costs could strip investors of a percentage point in their return—he predicted they might realize annual returns in the 17-year period from late 1999 to late 2016 that would be a so-so 6%.

Today, with the 17 years having passed, what is the answer?

First of all, be reminded that the stock market—as it is presented by the Dow and Standard & Poor’s indices, for example—does not deal in “net” returns. What you monitor on your computer screens are gross returns, before any trading and management costs are deducted.

But the record shows that the period’s gross returns are anemic enough to confirm Buffett’s general accuracy. From mid-November, 1999, to last Friday’s trading day, the annualized total return to investors from the Dow Industrials was 5.9%.

Having proved his ability to handle crystal ball work, Buffett, 86, was asked by this writer—an 87-year-old friend of his—whether he might care to make a prediction about total returns over the 17 years starting now and ending late in 2033. He declined to name a rate of return, explaining “I have to be careful what I say because I have no doubt that you will be around then to write another follow-up report.”

Buffett did, nonetheless, proffer three thoughts about those coming 17 years.

First, he believes that an investor in a low-cost S&P index fund who reinvests all dividends will do better—very likely substantially better—than an investor who buys a 17-year government bond and reinvests all of his coupons in the same instrument.

Second, he suspects that amateur, “do-nothing” investors following the same index fund strategy will in aggregate end up with results superior to those realized by investors who choose to employ professionals charging high fees.

Third, he predicts that many professionals who fail their investors by underperforming the index funds will get very rich in the process of doing so.

Retired senior editor-at-large Carol Loomis is a longtime friend of Warren Buffett’s. She has also been a Berkshire Hathaway shareholder for many years.