Home improvement chain Lowe’s Cos. Inc. followed larger rival Home Depot Inc. in reporting better-than-expected quarterly sales as strength in the housing market and favorable weather led to strong demand for building and home renovation products.

Shares of the company, which also raised its profit forecast for the year ending January 2017, were up almost 3 percent in early trading.

Results from the home improvement chains stand in stark contrast to grim quarterly reports from retailers such as Macy’s Inc. as consumer spending shifts away from apparel and accessories to big-ticket items including cars and homes.

E-commerce and home improvement remain pockets of strength in a choppy and volatile consumer spending backdrop, Robert W. Baird & Co. analysts wrote in a pre-earnings note.

Lowe’s raised its full-year profit forecast to about $4.11 per share from about $4.

Sales at stores open more than 13 months rose 7.3 percent, well above the 4.3 percent growth expected by analysts polled by research firm Consensus Metrix.

Net income rose to $884 million, or 98 cents per share, in the first quarter ended April 29, from $673 million, or 70 cents per share, a year earlier.

Excluding items, the company earned 87 cents per share, beating the average analyst estimate of 85 cents, according to Thomson Reuters I/B/E/S.

Net sales rose 7.8 percent to $15.23 billion, beating the average analyst estimate of $14.87 billion.