Last October, I said it was a bad idea to invest in HP (HPQ -0.36%) because its rising PC sales were temporary and its printing business was stuck in a secular decline. I said the tech giant was treading water with buybacks, and its weaknesses would eventually overwhelm its strengths.

But since I wrote that article, HP's stock price has rallied nearly 70% as the S&P 500 has advanced less than 20%. Let's see what I got wrong, and whether or not it's too late to buy HP after its surprising gains.

Has HP overcome its biggest problems?

HP generated 69% of its revenue from its Personal Systems business, which sells notebooks, desktops, and workstations, in fiscal 2020. The remaining 31% came from its printing business, which sells printers and supplies.

A desktop PC with an open case.

Image source: Getty Images.

HP has faced two major challenges since it spun off its enterprise hardware and software unit as Hewlett-Packard Enterprise (HPE -0.64%) in late 2015. First, demand for new PCs, especially desktops, has remained weak due to longer upgrade cycles and competition from mobile and hybrid devices.

Second, sales of commercial and consumer printers has remained sluggish due to slow upgrades, the increased usage of digital documents, and the rise of paperless workplaces. The segment's razor-and-blades model, which sold lower-margin printers in order to sell higher-margin supplies, also crumbled as customers bought cheaper generic ink and toner online.

The growth of HP's two core businesses decelerated significantly in fiscal 2019 and 2020 but firmed up as pandemic-related tailwinds kicked in during the first quarter of 2021.

Revenue Growth

FY 2018

FY 2019

FY 2020

Q1 2021

Personal Systems

13%

3%

1%

7%

Printing

11%

(4%)

(12%)

7%

Total

12%

0%

(4%)

7%

Data source: HP.

HP's Personal Systems business recovered in the first quarter as surging sales of consumer PCs for remote work, online education, and gaming offset its lower sales of commercial PCs. Its total shipments rose 15%, with a 33% jump in notebooks offsetting a 23% decline in desktops.

The Printing business recovered, with higher sales of consumer hardware for stay-at-home tasks offsetting its fading sales of commercial hardware. That expanding hardware base, along with the growth of its Instant Ink subscription service, boosted its supplies revenue 3%.

HP didn't provide any revenue guidance last quarter, but analysts expect its revenue to rise 7% this year but dip 1% next year -- which implies its old problems could resurface after the pandemic ends.

Expanding margins and robust earnings growth

HP's operating margins declined last year, mainly due to weak sales of its printers and supplies. However, its margins expanded significantly last quarter, and big buybacks further boosted its EPS growth.

Period

FY 2018

FY 2019

FY 2020

Q1 2021

Operating Margin

7.1%

7.3%

7.2%

9.4%

EPS Growth (YOY)

23%

11%

3%

42%

Data source: HP. Non-GAAP. YOY = Year over year.

The operating margins of both businesses expanded year over year thanks to favorable pricing power for home PCs and printers. Lower commodity costs also buoyed the Personal System unit's margins.

HP expects its operating margins to hold steady for the next few quarters, and for its non-GAAP EPS to rise 38%-43% for the full year. Wall Street analysts expect its earnings to rise 44% this year, but grow just 3% next year.

Once again, those estimates indicate HP's growth will decelerate after the pandemic ends. HP's stock might seem cheap right now at 10 times forward earnings, but it would only be a bargain if the company overcomes the secular declines of the PC and printing businesses after the crisis ends -- which could prove challenging as more people return to work and stop upgrading their home PCs and printers.

Will HP's stock continue to rally?

Many tech stocks recently declined as rising bond yields sparked a rotation from growth to value stocks. HP resisted that sell-off because it can be considered a value stock, and its forward yield of 2.4% is comfortably higher than the 10-Year Treasury's yield of 1.7%. The company also remains committed to returning most of its free cash flow to investors via buybacks and dividends.

However, I don't think HP has solved its biggest problems yet. The pandemic generated unexpected tailwinds, but those gains are ephemeral and future upgrade cycles will remain painfully long. The growth of its supplies business is encouraging, but it won't defeat generic ink and toner makers anytime soon.

HP might still have more room to run as rising bond yields push investors toward cheaper defensive tech stocks, but other evergreen tech stocks offer a better balance of value and growth than this aging PC and printer maker.