HP shares climbed on Wednesday after the stock was upgraded to "buy" by Citi analyst Jim Suva, who expects the company to continue to gain PC market share.
The stock was the top mover in the S&P 500 on Wednesday morning, with shares closing up more than 2 percent.
HP is moving toward more premium products, including hybrids and gaming, that could drive it to make gains as the PC market is revived, Suva wrote.
Citi's upgrade comes on the heels of new data from IDC, which said that global shipments of PCs increased for the first time on an annualized basis since the first quarter of 2012. HP got the top market share for the first times since the beginning of 2013, with 13.1 million shipments, according to IDC.
Positive trends in the U.S. economy — including strong employment data and high consumer confidence — signal that demand may continue, Suva wrote. The unemployment rate fell to a 10-year low of 4.5 percent in March, the Bureau of Labor Statistics said last week, though job creation fell short of estimates, as did a measure of consumer sentiment.
UBS analyst Steven Milunovich wrote on Wednesday that he's bullish on the stock, noting the PC revival and a stabilization in the printer market.
"We think investor skepticism provides fuel for further gains," Milunovich wrote.
— CNBC's Todd Haselton contributed to this report.