Hewlett-Packard (NYSE:HPQ) has rallied more than 20% in 2014, far outperforming the broader market.

HPQ Total Return Price Chart

HPQ Total Return Price data by YCharts.

Interestingly, its continued reliance on traditional PCs has proven to be immensely beneficial. Viewed in the context of the broader industry, Hewlett-Packard's rally is not so shocking.

The end of Windows XP
Hewlett-Packard's year-to-date rise lines up with similar moves seen at chip giant Intel (NASDAQ:INTC) and Windows developer Microsoft (NASDAQ:MSFT). Although Hewlett-Packard is the best-performing of the group, all three stocks have beaten the broader market this year with double-digit gains.

HPQ Total Return Price Chart

HPQ Total Return Price data by YCharts.

The correlation is not coincidental. In April, Microsoft officially ended technical support for Windows XP after nearly 13 years. At first, that might not seem significant, but a shocking number of PCs continue to rely on Microsoft's ancient operating system: As of May, Net Applications estimated that more than one in four Internet-connected PCs still used Windows XP. That is a problem, as the end of support means the end of patches and security fixes -- in the future, XP users will be exposed to viruses and exploits.

Users of Windows XP can simply buy a newer operating system from Microsoft, but many -- particularly enterprises -- have taken the opportunity to purchase an entirely new PC. That's been great for Hewlett-Packard, the world's second-largest manufacturer of PCs. Gartner estimates that Hewlett-Packard sold 16% of the world's PCs in the first quarter this year, with shipments rising 4.1% from the first quarter of 2013.

Intel has likewise benefited, as its processors power the vast majority of the world's traditional PCs. The company accounted for more than 85% of the PC processor market in recent quarters.

Strong PC sales boost Hewlett-Packard's earnings and raise Intel's guidance
Some forward-thinking analysts had expected the end of Windows XP to benefit Hewlett-Packard, Microsoft, and Intel, and investors may have piled into the stocks ahead of April. But financial results from all three companies have supported the notion that the PC market is experiencing something of a resurgence.

In May, Hewlett-Packard's earnings came in broadly in line with Wall Street analysts' expectations. Revenue was a bit light, but sales in Hewlett-Packard's personal systems unit (which is largely made up of PCs) were up 7% on an annual basis. Likewise, in June, Intel announced that its quarter was going better than it had anticipated, including a roughly $700 million spike in revenue beyond what had been anticipated. In April, Microsoft shares rose after the Windows maker posted better than expected earnings. Revenue from Windows OEMs was up 4%, with a 19% gain in Windows Pro revenue (enterprise).

Is the PC's resurgence fleeting?
With Hewlett-Packard's rally appearing to be largely a byproduct of a resurgent PC market, investors may be skeptical that the stock can continue to outperform -- at some point, businesses are going to finish their transition, while tablets and smartphones continue to get better. 

That may be the case, but Hewlett-Packard is take other steps as well. In May, it announced another round of job cuts, saying that as many as 16,000 additional Hewlett-Packard employees could be laid off. At the same time, it's making big bets on new products, including a supercomputer called "The Machine."

With PCs and printers still accounting for more than half of its revenue, Hewlett-Packard has much work to do before it can shed its image as a PC giant. But that may not be a terrible thing -- it has definitely benefited Hewlett-Packard shareholders in 2014.