NEW YORK (Reuters) - After months of handwringing about the possible crash-landing of the housing market, investors awaiting quarterly earnings from No. 3 U.S. homebuilder PulteGroup Inc this week were ready for the worst.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., April 23, 2019. REUTERS/Brendan McDermid

Their trepidation was justified. New home sales across the country had fallen for three consecutive quarters to close out 2018. Housing stood out as a particularly dark spot among several key sectors of the American economy showing signs of fatigue by the end of last year, giving rise to worries about recession.

Instead, Pulte delivered something unexpected: optimism.

“2019 can turn out to be a good year for the housing industry,” Chief Executive Ryan Marshall said on a conference call. Historic lows in unemployment are “allowing for some wage inflation and continued high consumer confidence,” he said.

Marshall’s renewed confidence was backed up by government data that same day showing new home sales rose nearly 15% in the first three months of the year, the strongest quarter in six years.

And it’s not just the housing market looking up.

Across industries from soda-pop to bulldozers and software to social media, companies are delivering results that suggest the U.S. economy might not be all that bad.

Beyond PulteGroup, scores of companies are beating Wall Street’s forecasts for the first quarter, including beverage maker Coca-Cola Co, heavy-machinery manufacturer Caterpillar Inc, software maker Microsoft Corp and social media platform Twitter Inc, each representing a distinct slice of the economy.

That resilience may be further confirmed on Friday when the Commerce Department releases its first reading of gross domestic product (GDP) for January through March, which just six weeks ago appeared headed for stall speed but has gathered pace since.

Indeed, in the first days of 2019 the odds looked stacked against the U.S. economy, with a partial government shutdown, fallout from tariffs and trade uncertainty, a strong dollar, frigid weather that kept consumers indoors, wild-swinging stock markets late last year and a diminishing boost from tax cuts.

“It looked like we were heading for a very, very poor quarter,” after weak numbers on retail sales earlier this year, said Brian Rose, senior Americas economist at UBS Global Wealth Management’s Chief Investment Office.

From the second half of the quarter, however, job and wage gains as well as retail sales figures have shown improvement.

RECESSION? WHAT RECESSION?

What a difference a month makes. In mid-March, Wall Street analysts were fretting about an imminent profits recession, and some economists worried an economic recession might follow in its wake.

Profits at S&P 500 companies, seen declining for the first time in three years just a month ago, now appear on course for another quarter of growth as first-quarter results pour in, according to I/B/E/S data from Refinitiv.

This is the first quarter in more than a year when investors are poised to get a real view of Corporate America’s strength because so much of last year’s earnings growth came from a major business tax cut. A year ago, S&P 500 profits grew 26.6% year-over-year, and at present this year’s first-quarter earnings are forecast to be flat, although profits among companies that have reported so far are up 7.1%.

That improvement is matched by measures tracking the wider economy.

As recently as March, the Federal Reserve Bank of Atlanta’s widely followed GDP Now model predicted a barely positive reading of first-quarter GDP. Now it forecasts 2.7% annualized growth and the consensus estimate in a Reuters poll calls for 2.0%. Growth clocked in a 2.2% in the fourth quarter.

For the moment at least, fears about the economy so intense that they triggered an end to rate hikes by the Federal Reserve now seem to be unfounded. The Fed’s rate-hike holiday, confirmed after their March policy meeting, has helped keep the pressure off debt-dependent sectors.

Consumers have also weathered the storm. A competitive job market helped lift a key benchmark of private-sector wages 3.2% over the last year, the strongest in a decade, Labor Department data shows. That helped keep demand robust for consumer goods and services, and companies in those areas posted better revenues in the first quarter.

Certainly some risks remain in place.

Any collapse in U.S.-China trade talks that leads to an escalation of tariffs could end the relief surrounding the economy, according to Tony Roth, Chief Investment Officer for Wilmington Trust.

“I don’t think China or the U.S. can afford to not get a deal done,” he said. “If they don’t get a deal done with China - to the point where there’s additional tariffs that come on - that would be catastrophic for markets.”

And with profits growing more slowly, companies may struggle to justify further spending and investment, especially as margins come under pressure from higher wages and other costs.

Still, the resilience of the American job market, with unemployment near a 50-year low, is providing a strong foundation for continued growth in consumer spending, the engine that accounts for two-thirds of U.S. economic activity.

“If you want to look at the consumer,” said Rose, the UBS economist, “the most important fundamental is the labor market, which is very strong.”

(This story has been refiled to use preferred name for Wilmington Trust, in 21st paragraph).