After October wiped out about $2.5 trillion from the U.S. stock market, investors began questioning the wisdom behind escalating a trade war with China as well as the Federal Reserve’s raising of interest rates.

And in a matter of days things changed.

Fed Chair Jerome Powell changed course on rate raising last Wednesday, going from hawkish in October to dovish by saying rates are now just below what the Fed considers “neutral.”

And then a couple of days later, Presidents Donald Trump of the U.S. and Xi Jinping of China came to an agreement to hold off on further tariffs while the two sides try and iron out a new trade deal in the next 90 days.

According to Greg Valliere, chief global strategist at Horizon Investments, that’s exactly what the markets demanded of the president and leader of the central bank.

Per Bloomberg:

“The Dow vigilantes have managed to get both a Powell put and a Trump put for the market,” said Ed Yardeni, lead strategist at his namesake research firm. “Jerome Powell turned into Santa Claus last Wednesday, markets certainly reacted joyously to his hints that Fed tightening would occur at an even more gradual pace. So if Jerome Powell is Santa Claus, then the two elves are President Trump and President Xi.”

Trump-Powell

It’s not the first time Yardeni has invoked an equity-market version of the phrase he coined in 1983 in reference to bond traders who signaled disapproval of monetary or fiscal policies by dumping debt. The strategist said in March that Dow vigilantes pouring out of stocks were signaling their disapproval of tariffs on steel and aluminum as Trump ratcheted up his trade war with China.

The S&P 500 has since rallied more than 6 percent since falling into correction territory by the end of November, pushed higher by Powell’s pivot.

Trump had voiced displeasure several times over the rising interest rates and how they affect the stock market, and then the equity benchmark surged 1.5 percent Monday after Trump and Xi agreed to put their tariffs on hold at Saturday’s G-20 summit.

For Trump, who has used the market as a barometer of his success, the six-week sell-off likely played a role in his decision to ease up on the trade front. He’s tweeted about the financial markets nearly three dozen times, often taking credit for market gains.

“Trump will do whatever it takes to keep the financial markets happy,” Horizon’s Valliere said. “One could argue that both Trump and Jay Powell got their marching orders this fall and they complied in the last two weeks by saying what the markets wanted to hear.”

The trade tensions had help in rattling investors in the past six weeks, with concern mounting that global growth is slowing at the same time central banks pull back support. Hedge funds turned cautious on the biggest technology names that have led the record bull run, and retail investorsraised cash at the fastest pace in three years.

Taken together, an equity market that had been setting records under Trump suddenly was negative for 2018 with little sign of where the next catalyst would come from. The G-20 offered Trump a chance to provide a jolt.

“There’s two things driving Trump — one is the stock market and the other is the self-imposed tariff timetable,” said Kim Forrest, senior portfolio manager at Fort Pitt Capital. “If everybody would’ve walked away, the market would be down big time.”