Market Update: We break down the business implications, market impact, and expert insights related to Market Update: For Trump, a Promised Economic Boom Collides With the Costs of War – Full Analysis.

To President Trump, the U.S. economy appeared to be moving in his direction at the turn of the year.

The stock market was buoyant, prices had started to level out and White House officials saw ample evidence for robust growth on the horizon. There were mounting signs of serious strain, but the president projected optimism anyway, as he tried to convince a restive public that the nation’s fortunes had improved.

But that was before Mr. Trump started the war in Iran in a move that has unnerved consumers and businesses around the world. Now, by his own hand, the president has upended his vision for the nation’s economic trajectory, creating a new set of hazards months before the midterm elections.

For Mr. Trump, the greatest threat is the rapid rise in energy prices, which have rippled across the economy in ways that have pinched American families even beyond the gasoline pump. The soaring oil costs have at times spooked financial markets, one of Mr. Trump’s preferred barometers for success, and threatened to aggravate what has already been a long, tough battle against inflation.

Gas prices have also undercut Mr. Trump’s lofty projections of growth this year, which he and aides previously pegged at 4 percent or more. Now, their talk of a boom has been replaced with a new round of speculation among economists over the odds of a recession, as families and businesses pull back in the face of higher gasoline costs and elevated uncertainty.

Not everything was as rosy as the White House had claimed before it began military operations in Iran. The first year of Mr. Trump’s second term marked a period of immense disruption, particularly in the labor market, which saw new job cuts as businesses grappled with the twin shocks of a trade war and new technology. Many Americans had also reported real trouble paying for groceries and other goods, even though the president frequently dismissed concerns about affordability as a hoax.