After opening higher, stocks are now lower on the day: the Dow Jones Industrial Average (^DJI -1.25%) and the broader S&P 500 (^GSPC -0.84%) are down 0.47% and 0.37%, respectively, as of 1:25 p.m. EST. It's a sea of red in the Dow, with the ratio of gainers to losers better than 3-to-1. Two stocks that are managing to post gains are Cisco Systems (CSCO -0.51%) and Hewlett-Packard (HPQ -0.43%).

As I mentioned in this column, Cisco delivered the goods in its results reported after yesterday's market close, beating on earnings per share and revenue. The shares popped nicely in the after-hours session, so it's no surprise to see them up 5.9% today.

But what of HP, which is up about 0.4% on the day? Absent any relevant news, is it right for the shares to trade up in sympathy with Cisco's?

On the face of it, the two companies certainly share some similarities: They're both "old tech" stalwarts that are important suppliers of technology infrastructure to businesses. Furthermore, although HP's situation is much more dire -- it is in the process of a fundamental turnaround under former eBay CEO Meg Whitman -- both shares have been dreadful laggards, as the following five-year chart shows:

HPQ Chart

HPQ data by YCharts.

It turns out that the correlation between HP's and Cisco's normalized quarterly EPS going back to July 1993 is very high at 0.78. (Correlation, which takes on values between minus one and one, is a statistical measure of the degree to which two variables move together. A correlation of one indicates "perfect" correlation.) HP and Cisco share roughly the same fiscal quarterly calendar, which doesn't coincide with the calendar year, and HP will next report its results for its quarter ended Oct. 31 on Nov. 20. In that context, perhaps HP's gains today are a rational response to Cisco's earnings surprise.

Back to Cisco, though: Even after today's pop, the stock is still valued at less than 10 times the forward EPS estimate. If you want a comprehensive assessment of this opportunity, click here to receive our premium report, which includes a full year of updates.