President-elect Donald Trump and Elon Musk watch the launch of the sixth test flight of the SpaceX Starship rocket on Nov. 19 in Brownsville, Texas. Brandon Bell/Getty Images

President-elect Donald Trump, by naming Elon Musk to head up a committee to slash government spending, has taken a surprise turn from his first term to a more austere outlook that is getting a warm welcome on Wall Street, according to a report.

Trump selected, Musk, the world's richest man to lead the Department on Government Efficiency, and the CEO of SpaceX and Tesla has targeted $2 trillion in annual government spending cuts, Investor's Business Daily reported.

Musk said the tightening of the belt would mean that there would be "temporary hardship" but that it would lead to long-term prosperity.

Trump's turn to austerity came after a first term in which his 2017 tax cuts swelled the budget deficit and he took a hands-off approach to Social Security and Medicare, the report said.

On the presidential campaign trail, Trump proposed initiatives that would add $7.75 trillion to the national debt over the next decade, the report said, citing data from the Committee for a Responsible Federal Budget.

But by naming Musk to lead DOGE, he is taking a sharp turn toward fiscal stability, which is spurring a postelection S&P rally, Investor's Business Daily reported.

Investment strategist Ed Yardeni's faith in Musk's ability to succeed was behind his bullish market call earlier this month, lifting his 2030 S&P target to 10,000 from 8,000, the report said.

"We expect that better economic growth will boost federal government revenues and that Elon Musk will succeed in slowing the growth in federal government spending," Yardeni wrote.

"GDP growth might actually keep pace with mounting government debt," he added.