As Donald Trump has been busy telling everyone, these are happy days in the stock market. On Wednesday—the day before the thirtieth anniversary of “Black Monday,” October 19, 1987, when prices on Wall Street crashed—the Dow Jones Industrials Average closed at yet another record: 23,157.60. For the year to date, the Dow is up about seventeen per cent. Since last November’s election, it has risen by about a quarter.

Practically every day, Trump boasts about the market’s performance. On Sunday, he wrote, “The U.S has gained more than 5.2 trillion dollars in Stock Market Value since election day!” On Monday, he retweeted a headline about the Dow passing twenty-three thousand for the first time. On Tuesday, he tweeted out a stock-chart graph with the message “WOW.”

Trump’s facts were pretty accurate, for once, but they were woefully incomplete. The market’s rise began way back in March, 2009, when, amid a global financial crisis, the Dow bottomed out at below six thousand five hundred. From there, it rose to 18,332.74 on November 8, 2016, the day that Trump shocked everyone, himself included, by winning the Presidential election. Over seven years and eight months, the cumulative rise in what could have been termed the “Obama bull market” was about a hundred and eighty-three per cent.

During his time in office, and particularly during his 2012 reëlection campaign, Obama often pointed to the market’s strong performance, but he didn’t make a fetish out of it. There were two good reasons for that. Although Presidential policies do affect the economy and the market, the link is often indirect and somewhat tenuous. In addition, as Black Monday so vividly demonstrated, what goes up can also go down. Presidents who attach their names to bull markets run the risk of becoming associated with a subsequent crash—a fate that could well befall Trump. In recent months, as the upward trend in stock prices has accelerated, the risk of a violent reversal has been increasing by the day.

To be sure, you won’t hear many brokers or stock strategists saying this out loud. As usual, the consensus on Wall Street is that this is a good time to buy. And the markets themselves are reinforcing this message. The most widely watched measure of stock-market risk—the “VIX index”—has been hitting new lows all year. But that isn’t really very reassuring: in fact, it could well be another warning sign. At the end of 2006, just before the start of the subprime crisis, which eventually crushed stocks, the VIX index was almost as low as it is today.

Stock-market investors don’t have the bursting of a real-estate bubble to deal with now, but there is another clear and present danger. The Federal Reserve is tightening monetary policy at a time when stocks are trading at valuations well above their historical averages. Looking back, this combination of circumstances has often proved disastrous for stocks. The stock-market crashes of 1929, 1987, and 2000 all came at moments when the Fed was raising interest rates and valuations were elevated.

Of those three crashes, the one on Black Monday may well be the most pertinent. In the autumn of 1987, as today, the economy appeared pretty healthy. Profits and payrolls were rising, and the stock market was on a tear. In the first nine months of the year, the Dow rose by more than forty per cent. But, even though prices had risen to very high levels relative to earnings and accounting values, they weren’t quite high enough for investors to agree that a bubble had inflated. (In October, 1987, the price-to-earnings index of companies in the S. & P. 500 index was about twenty-three; today, it is about twenty-five.) And, apart from Elaine Garzarelli, a stock analyst at Shearson Lehman, virtually nobody predicted a big sell-off.

Right now, the market is counting on a “Goldilocks scenario,” in which economic growth remains vibrant enough to boost corporate profits but also modest enough to prevent the Fed from speeding up its interest-rate increases. The market is also pricing in a substantial corporate tax cut that the Trump Administration is hoping to pass. But the Goldilocks scenario isn’t the only potential future for the economy, and the tax cuts are far from a sure bet to pass Congress. Economic growth seems to be speeding up around the world, and inflation, which has been quiescent, might start to pick up. If it does, the Fed could well act more aggressively than the market is expecting. And the Trump tax cuts might suffer the same fate as the G.O.P.’s efforts to repeal Obamacare.

To be sure, these are risk factors rather than predictions, but that is the point. As often happens in the later stages of a bull run, investors are accentuating the positive and largely ignoring the risks. Even institutional investors who privately harbor doubts, and there are some of them, are almost all staying fully invested, lest they miss out on further gains.

That is how stocks move far from fundamental values, and Trump is acting as their cheerleader-in-chief. That is his choice. But, as he eagerly lays claim to the “Trump bull market,” he could end up owning “the Trump Crash,” or, at least, “the Trump Slump.”