Stocks finished the week on a positive note, with big gains for major market benchmarks. As we've seen numerous times before, the Nasdaq Composite (^IXIC -1.15%) managed to put up the biggest gains, but performance for the Dow Jones Industrial Average (^DJI -0.12%) and S&P 500 (^GSPC -0.58%) wasn't anything to be disappointed with, either.

Index

Daily Percentage Change

Daily Point Change

Dow

+1.00%

+331

S&P 500

+1.89%

+74

Nasdaq

+2.66%

+288

Data source: Yahoo! Finance.

As you'd imagine, plenty of stocks saw solid gains on the market's up day. But few were able to keep up with high-flying shares of Ally Financial (ALLY 0.86%) and Wayfair (W -1.08%), both of which posted gains of 20% on Friday. Read on to find out why shareholders were so excited about these two stocks and whether the future could bring even more gains.

Ally looks for a turnaround

Ally Financial's big gains came after the financial institution reported its fourth-quarter and full-year results. Even though Ally remained under pressure at the end of 2022, investors seemed optimistic about its prospects for turning things around in the year to come.

Ally's results reflected the challenges that the company has faced. Net financing revenue for the quarter edged upward by 1% from year-ago levels, but a big rise in noninterest expense hurt the company's bottom line. Net income dropped by about 60% to $251 million, and even after accounting for some unusual items, adjusted earnings of $1.08 per share fell sharply from $2.02 per share in the previous year's period. Full-year numbers showed the same strains, with net income and earnings falling significantly from 2021 levels.

The biggest problem for Ally was that it has been reliant on auto loans for much of its business, and pre-tax profits in its automotive consumer finance segment dropped by nearly half in the fourth quarter and were off 40% year over year in 2022. Moreover, Ally boosted its provision for credit losses to $490 million during the quarter, up from $210 million in the year-ago period, as credit market conditions deteriorated.

Yet Ally said that it expects to earn as much as $4 per share in 2023, and that was more than most investors expected. With the stock having opened Friday at just 7 times that $4 per share earnings estimate, it's hard for value investors to pass up the opportunity to get in on Ally's opportunities.

Wayfair looks to cut more costs

Meanwhile, the jump in Wayfair stock came after the online furniture specialist joined the chorus of tech-related companies announcing layoffs. Wayfair said that it would look to cut 1,750 employees, working out to about 10% of its global workforce coming into 2023.

The move came as part of Wayfair's broader cost-cutting initiatives. The retailer said that it anticipates saving $1.4 billion every year from implementing its plan to improve business efficiency, and Wayfair is already well under way in getting measures in place as it aims to stop losing money. A large portion of the job cuts will come from the corporate staff, with 1,200 layoffs amounting to 18% of that segment of Wayfair's employee base.

Investors were also pleased that Wayfair's operational business seems to be seeing improving conditions. The company said that December sales trends were more favorable than November's corresponding figures, most notably in order volume. CEO Niraj Shah sees Wayfair's market share improving as a result, as weaker players give way in the tough economic environment.

Big share-price gains are coming for stocks that were considered to be in danger of failing, as even the hope of a full recovery is enough to send share prices rebounding. That's no guarantee that things will work out as well as bullish investors hope, but it does show the extent to which markets have been extremely pessimistic over the past year.