(AP Photo/Paul Sakuma)

What has been the hottest stock on the Dow Jones industrial average this year? It’s the long-downtrodden Hewlett-Packard, whose shares have risen more than 50 percent as of Wednesday. H-P had been pretty much a disaster since April 2010, when the stock price peaked above 50. Between then and last November, it had lost a phenomenal 78 percent of its value. But over the past three months, H-P has been showing signs of life again.

Hewlett-Packard came by its troubles honestly. First of all, there was the weakness in the PC market that drove Dell back into private hands. H-P pushed forward into the tablet market, but its webOS was a failure in the face of Android-fueled tablets from Asus and Lenovo, and H-P was eventually forced to sell the business to Korean conglomerate LG last month.

H-P also suffered from some spectacularly ill-advised acquisitions. It recently had to write off $8 billion from its 2008 purchase of Electronic Data Systems — the company founded back in 1962 by H. Ross Perot — and another $1 billion resulting from its 2010 acquisition of the PDA manufacturer Palm, which brought with it the ill-fated webOS. But those were small beer compared to the botched 2011 purchase of Autonomy, a British enterprise software company. That’s cost not only another $9 billion in writedowns, but forced the H-P board to target five board members for removal and launched, at last count, a double-digit number of lawsuits.

These issues forced the company to run through several CEOs. After the beleaguered Carly Fiorina was forced to resign in 2005, she was replaced by Mark Hurd, who himself resigned in August 2010 over an alleged inappropriate relationship with a consultant. Hurd’s eventual replacement, Léo Apotheker, himself lasted less than a year before being replaced by former eBay CEO Meg Whitman in September 2011.

The stock had pretty much bottomed out when Whitman took over, having lost more than 45 percent of its value over the course of the year before she officially took office on Sept. 22, 2011. The stock was at about 22 then, and perked up for a while, rising to a temporary high near 30 the following February.

Then things starting falling apart again. Second quarter profits were devastatingly poor, down 31 percent, and their report was accompanied by the news that H-P would be laying off 27,000 workers. By September, that was upped to 29,000. Then, in November, the Autonomy deal blew up, and the subsequent writedown sent the stock to below 12.

At that point, there was nowhere to go but up. Whitman’s tenure, which had looked promising at the beginning, was then over a year old and had resulted in the stock losing more than half its value.

But almost miraculously, the ship began to turn around. H-P’s first-quarter income was down by 15 percent from the same quarter a year earlier, but Wall Street expectations had fallen so low that that was enough to exceed them. Revenues similarly dropped, but still beat the estimates. Perhaps just as significantly, there were no more layoffs announced, no other bad news. And Whitman said she expected to see revenue growthin 2014. Hewlett-Packard also announced it would be issuing a dividend in April.

By the end of the year, Hewlett-Packard had reestablished itself as the leading player in the PC market, with a 16 percent share of all PCs sold to 14 percent for second-place Lenovo. Not only did its subsequent first-quarter earnings outperform expectations, but it announced projected second-quarter earnings that beat Wall Street estimates as well. Considering a spinoff of H-P’s PC business was one thing that helped lead to Leo Apotheker’s ouster as CEO. Whitman, his replacement, gleefully announced at the earnings report that H-P now had no plans whatsoever to break up the company.

Earlier this week, Morgan Stanley announced an upgrade of Hewlett-Packard’s stock, changing its rating from “equal weight” to “overweight.” The change was a result of a new evaluation of H-P’s free cash flow, upgrading it from a $5 billion estimate issued last November to a new estimate of $6.7 billion. That upgrade alone sent H-P stock up by 3 percent on that day, making it the best-performing stock in the entire Dow.

And it’s been the best-performing stock in the entire Dow for all of 2013, with an increase of 52.6 percent. The next-closest Dow riser is Travelers, up a relatively piddling 15 percent. Truly, Hewlett-Packard’s moment has once again arrived.

 

For more, see:

The trouble with buybacks

Q3 recap: 5 biggest losers on the S&P 500

The Effects of Earnings Season