The big run-up in U.S. stocks since their Christmas Eve lows was propelled by the strong economy and a pause in interest-rate increases by the Federal Reserve.

But most of all it was driven by the hope that the U.S. and China would strike a trade deal to end the tariff war launched by President Donald Trump in March 2018. As optimism grew that a deal was near, stocks reached new all-time highs — until the Tweeter in Chief sent markets reeling with threats he would impose higher tariffs on $200 billion of Chinese goods by this Friday.

The Shanghai and Shenzhen indices fell more than 5%, the Dow Jones Industrial Average DJIA, +0.01% shed more than 500 points, and the S&P 500 Index SPX, -0.16% gave up 2.1% in the two trading days since the president’s Twitter hammer fell.

Yet I think this sell-off would have happened even if a deal had been struck. Months of positive comments from administration officials had led investors to expect an imminent trade deal between the world’s two economic superpowers. Pundits had speculated Chinese President Xi Jinping would fly to Mar-a-Lago as early as June to affix his signature to a freshly minted bargain, sealing a triumph for President Trump a year and a half before the 2020 election.

Through much of 2018, worries about trade kept a lid on stocks: They sold off on bad news and rose along with hopes of a resolution. Last December, Aditya Bhave, an economist at Bank of America Merrill Lynch, estimated that trade tensions had shaved 6% off the S&P 500’s potential gains.

Happy talk

But since the late-year sell-off, both the Trump administration and the Chinese government have struck a more positive note, and investors have bid up stocks. In mid-February, U.S. Trade Representative Robert Lighthizer and Treasury Secretary Steve Mnuchin met with President Xi, and President Trump called the talks “very productive.”

In late March, China’s official news agency, Xinhua, noted “new progress” in subsequent negotiations with Lighthizer and Mnuchin, while Larry Kudlow, director of the National Economic Council, said the two sides had made “good headway.”

Just last week, Mnuchin expressed hope the two sides would make “substantial progress” in coming negotiations, including a visit by chief Chinese negotiator, Vice Premier Liu He, to Washington, D.C., this week.

These are only three examples of the drumbeat of happy talk coming from the negotiators this year, and through all of them, stocks kept rising: The S&P 500 and the Nasdaq Composite Index COMP, -0.26% both hit new all-time closing highs last Friday, before the president’s tweets hit the fan.

Correction ahead

Obviously, this year investors’ expectations of a trade deal have been baked into stock prices, and that’s why the president’s weekend tweets caused the two-day selloff. But I think they’re only a preview of what could happen when a deal is finally done.

Why? Because we’ve seen this movie before. Just before the 2016 presidential election, the S&P 500 bottomed at 2085.18 points. When Wall Street, which had overwhelmingly backed Democrat Hillary Clinton, realized that a Trump administration would enact massive tax cuts for businesses (including them), stocks began a nearly 15-month-long rally.

They didn’t go straight up — fears of war with North Korea and skepticism even a Republican Congress would pass tax cuts caused lots of jitters along the way — but by the time the president signed the new tax bill on Dec. 22, 2017, the S&P 500 had tacked on nearly 600 points. It kept going through late January 2018, topping out at 2872.87, for a whopping 38% total gain from the pre-election lows.

Then, once Wall Street had digested the reality of tax cuts, the profit-taking began, shaving 10% off the S&P 500 by Feb. 8, 2018. Clearly investors had anticipated the Trump tax cuts by bidding up stocks, and it was time to cash in some chips.

That’s exactly what I expect to happen this time around with trade. I think the current sell-off is temporary, and the president’s sudden hard line looks like a negotiating tactic. Once some more differences are resolved, a deal will be done because both presidents need one. That will take stocks to new all-time highs followed by, I expect, a decent correction.

Those post-trade-deal highs would be a good time to take some profits. It’s one of Wall Street’s oldest rules: Buy on the rumor, sell on the news. It still works in both English and Chinese.