New York CNN Business  — 

Soaring mortgage rates and unaffordable home prices are worrisome signs for the broader housing market and economy. In another worrisome sign, housing starts and building permits for July both fell from June levels and missed economists’ forecasts.

But don’t tell that to Home Depot. The home improvement retail giant reported record earnings and sales for its most recent quarter.

Home Depot (HD) said Tuesday that overall revenue was up 6.5% from a year ago, to $43.8 billion. The company reported a net profit of $5.2 billion, or $5.05 a share. That topped Wall Street’s forecasts, as professional contractors and the do-it-yourself crowd kept spending.

The numbers were strong across the board. Sales at stores open at least a year, rose 5.4% from the same quarter in 2021 in the United States and 5.8% at all locations worldwide. The company also reiterated its earnings and outlook for the full year.

“Our performance reflects continued strength in demand for home improvement projects,” said Home Depot CEO and president Ted Decker in the earnings release. Decker added that these were the highest quarterly profit and sales figures in the company’s history, despite “a challenging and dynamic environment.”

Shares of Home Depot were up 5% in midday trading Tuesday, after falling initially in premarket trading.

Investors may have at first been focusing on the one negative in Home Depot’s report: Customers didn’t make as many purchases as they did a year ago. The number of overall transactions slid 3%. But this decline in activity was offset by the fact that customers spent more on what they did buy. The average sales ticket was a little more than $90, up 9% from last year.

Much of that spending spike was due to inflation. said Jeffrey Kinnaird, Home Depot’s executive vice president of merchandising, on a conference call with analysts.

But Decker also said during the conference call that Home Depot was not seeing any material signs of weakness in the housing market. He noted that demand was strong from both professional contractors as well as DIY consumers.

“With people spending more time in their homes, so repair and remodel, demand is going to increase from wear and tear. You’re going to want more space and just improvements in the home because you’re there more often,” Decker said during the call.

People want to fix their homes and have the cash to do it. Chief financial officer Richard McPhail said during the conference call that “our customer is just in a really good place right now.” He attributed much of that to the spike in home prices over the past few years.

And regardless of what happens to home sales, the trend of spending even more on their houses could continue, especially if the economy continues to cool this year and in 2023.

“The home improvement sector tends to perform well during recessions,” said Shoggi M. Ezeizat, an analyst at Third Bridge, in a report Tuesday. “We expect consumer demand to shift towards smaller scale remodeling projects, as individuals see their homes as stable investments during economic uncertainty.”

Home Depot’s earnings come during a busy week of reports from many of the nation’s largest retailers, Walmart (WMT) also posted results that topped forecasts Tuesday morning. Home Depot rival Lowe’s (LOW) and Target (TGT) will report earnings Wednesday.