Wall Street investors can be so fickle. And they love a winner.

The stocks market’s surge since Donald Trump’s surprise election victory might tempt some to call it a Trump rally, but keep in mind that it rallied even more when investors still thought Hillary Clinton would win.

The S&P 500 index SPX, -2.23% had just suffered its longest losing streak in 36 years, to close at a more-than four-month low on Friday. The slump came as Clinton’s lead over Trump in the polls narrowed following the Federal Bureau of Investigation’s decision to look into thousands of freshly discovered emails it deemed “pertinent” to its investigation of her use of a private server while secretary of state.

Then the FBI’s statement over the weekend that it didn’t find anything that would lead to charges triggered a sharp relief rally, with the S&P 500 index soaring 2.6% on Monday and Tuesday. Since Trump’s upset win, the index has gained only 1.3%.

Don’t miss:U.S. presidential election angst obscures 5 bullish facts about the stock market.

Meanwhile, the Dow Jones Industrial Average DJIA, -1.91% has run up 475.20 points, or 2.6%, since the Tuesday election to a record close Thursday, but it had run up a combined 444.46 points, or 2.5%, on Monday and Tuesday when a Clinton victory was still expected.

And the technology and small-capitalization company friendly Nasdaq Composite Index COMP, -2.85% jumped 2.9% the first two days this week, and has inched up just 0.3% since.

There are certainly companies that should perform better under a Trump-led administration than one run by Clinton, and perhaps more so because Republicans held on to their lead in Congress, but there are also those that could get hurt.

Don’t miss:What President-elect Trump means for companies, by sector.

Opinion Journal: President-Elect Trump

J.P. Morgan’s head of U.S. equity strategy Dubravko Lakos-Bujas said the health care, financial and energy sectors would benefit from lower regulations and reflation. But Lakos-Bujas also said low volatility sectors, and those which rely on overseas production, could suffer. These sectors include consumer staples, consumer discretionary and technology hardware.

So call it an election relief rally, or just a plain bull market, but don’t give the credit to any one person.