The stock market is easily rattled, but it can also be easily seduced.

President-elect Donald J. Trump’s long-term relationship with Wall Street is just getting started, but he has already demonstrated that he can not only shake up but also mollify the market. It soared to a record on Thursday, as Mr. Trump was preparing to meet with President Obama in the White House.

Consider that through Election Day, the stock market heavily favored Hillary Clinton for president and that as recently as Monday, the market rose sharply on news that the F.B.I. director, James B. Comey, had found nothing in the latest batch of Clinton emails to warrant prosecution. The market’s pro-Clinton bias was glaring on Tuesday night, as evidence of Mr. Trump’s strong performance trickled in and Mrs. Clinton’s chances dimmed.

Shocked by the prospect of a Trump presidency, traders sold off Standard & Poor’s 500-stock index futures contracts as fast as they could, and the market cratered. Within just four hours, by 12:08 a.m., those futures contracts plummeted almost 6 percent — a disorderly rout that seemed to predict a calamitous day on Wall Street.

Then Mr. Trump proceeded to charm the market, which remained in his thrall through Friday.

It started shortly after 2 a.m., when Mrs. Clinton telephoned him and conceded defeat. Soon afterward, appearing before cameras, Mr. Trump spoke calmly and graciously, saying that Americans owed Mrs. Clinton “a major debt of gratitude for her service to our country,” and appealing to her followers: “I’m reaching out to you for your guidance and your help so that we can work together and unify our great country.”