On Wednesday morning, Hewlett-Packard (HPQ -0.11%) hit a new 52-week high of $26.71, before pulling back to close at $25.93. The main catalyst for HP stock's gains was a big upgrade from "sell" to "buy" from analysts at Citi, who also doubled their price target from $16 to $32.

Despite significant improvements to its long-term business prospects -- and a skyrocketing stock price -- HP shares still traded for just 7.3 times expected 2013 earnings as of Wednesday's close. By contrast, Dell (DELL.DL) is on the verge of going private for more than 13 times expected 2013 earnings (or nine times earnings if you exclude excess cash). Even though Dell is even more heavily concentrated in the troubled PC industry, many highly respected investors are insisting that the company is worth far more than the proposed buyout price.

If Dell is undervalued at nine times earnings excluding excess cash, then HP stock is probably even more undervalued today. That's why I have argued previously that HP is a far better investment opportunity than Dell. Indeed, if the company can meet the targets set out for its various businesses, EPS should recover to $5 by mid-decade, which could potentially support a much higher stock price.

The beginnings of a turnaround
Based on several recent upgrades, it seems that the analyst community is finally taking notice of CEO Meg Whitman's initiatives to reduce HP's cost base, stop chasing unprofitable revenue, and build up new growth businesses. (The bargain valuation of HP stock is another big plus.)

While HP still competes in the challenging PC business with other companies like Lenovo and Dell, the vast majority of its profit comes from printing, enterprise services, and enterprise hardware. Indeed, less than 10% of segment profit was attributable to PCs in the first half of FY13! HP's non-PC businesses are much more likely to undergo a successful turnaround.

For example, one of the key findings driving Citi's recent upgrade of HP stock was a survey that showed HP has been stabilizing its share of the services business, after losing a significant amount of market share over the prior five quarters. This stabilization is a good sign, but it should not be very surprising to investors who have been following HP for a long time.

HP has been laser-focused on profit margin in the services business, and it has sacrificed some revenue in order to avoid being saddled with unprofitable contracts. Much of the revenue loss that has occurred recently was planned. But at the same time, HP is reducing headcount in the services group, slimming down to match the amount of profitable revenue it can bring in.

The printing business is even further ahead in the turnaround process than services, while other divisions still have work to do. However, on the whole, HP's fundamentals are starting to recover, setting the company up for a return to earnings growth next year, which will benefit HP stock.

Get ready for the rebound
The main reason why HP will probably return to earnings growth next year is that the company is beginning to recognize the benefits of a massive cost-cutting plan that should save at least $3 billion per year. More savings will roll in later this summer, as a large group of employees will leave under a voluntary early retirement program on Aug. 31. HP has also made significant progress in strengthening its balance sheet over the last several quarters, and will probably hit its zero net debt target by the end of the calendar year.

Both of these milestones should give a boost to HP stock. It is not unusual for companies with shrinking earnings and significant net debt to be punished with single-digit earnings multiples. However, if HP can return to earnings growth and a net cash position, its earnings multiple could very easily expand to 10. Another potential catalyst for share appreciation is an increase to HP's dividend or share repurchase plans. Both have remained relatively modest since Whitman took the helm two years ago and declared a focus on rebuilding the balance sheet.

If earnings growth resumes next year and HP stock eventually trades for 10 times earnings, shares could soon rise to $35-$40. Moreover, HP's new initiatives in microservers, software-defined networking, and inkjet printing provide a platform for long-term earnings growth, which will likely reward shareholders for many years to come.