Shares of Walgreens Boots Alliance (WBA -0.62%) rallied 15.1% this week through Friday at 11:09 a.m. ET, according to data from S&P Global Market Intelligence.

Walgreens reported earnings this week, and while the reported results don't look great in and of themselves, they beat analyst expectations. Furthermore, the company gave better-than-feared guidance for 2025. But does this week's positivity make the stock a buy?

A turnaround in the early innings

In the fiscal fourth quarter, Walgreens saw revenue increase 6% to $37.55 billion, ahead of expectations of $35.55 billion, while reporting adjusted non-GAAP (generally accepted accounting principles) earnings per share of $0.39. While down an unsightly 40.8%, that bottom line was actually ahead of expectations for $0.36.

Walgreens' profitability has been struggling as its margins have been squeezed by pharmacy benefit managers' (PBMs) reimbursement for certain drugs, which makes up a lot of the business. Meanwhile, the company has also been burdened by a significant debt load.

But new CEO Tim Wentworth was appointed exactly one year ago and hails from the PBM world. He's implementing a turnaround plan based on selling excess stores and other noncore assets, paying down debt, and renegotiating contracts with PBMs.

There was some progress announced on the call, with management announcing 1,200 store closures of underperforming retail stores over the next three years. That should help save money and evolve Walgreens to a more digital era.

Wentworth noted on the conference call that reimbursements have "stabilized," or not gotten worse. Management guided to year-ahead adjusted EPS between $1.40 and $1.80, which is about the current run rate. Wentworth also hinted that the company has visibility into 80% of PBM contracts for next year, while saying key PBM contracts are still in negotiation.

Walgreens investors breath a sigh of relief

It's good that results don't seem to be continuing to deteriorate, and that this period could mark a "bottom" in prescription profitability for Walgreens. However, there is still a long way to go for the company to make any sort of meaningful recovery, and there is still considerable uncertainty as to the PBM negotiations.

Still, the Walgreens turnaround bears watching for deep value investors going forward.