Lumentum (NASDAQ:LITE) and Micron Technology (NASDAQ:MU) both produce crucial components for a wide range of industries. Lumentum sells optical chips, and Micron is one of the world's leading memory chipmakers.

Both companies are driven by cyclical demand, but their stocks have trended higher through the peaks and troughs over the past decade. Lumentum's stock has rallied over 330%, while shares of Micron have advanced more than 150%.

Lumentum was clearly the stronger investment, but will it continue outperforming Micron over the next few years? Let's dig deeper to find out.

Servers in a data center.

Image source: Getty Images.

How do Lumentum and Micron make money?

Lumentum generated 89% of its revenue from optical communications components last quarter. The remaining 11% came from laser components.

Its optical components business sells optical chips to service providers and data center customers, as well as 3D-sensing chips that power advanced cameras and lidar systems in driverless cars. Its laser business sells devices for manufacturing, inspection, and life science purposes.

Lumentum significantly scaled up its optical business after it acquired Oclaro in late 2018. Its top competitors include II-VI, which acquired Finisar last year, and Infinera, which bought Coriant in 2018.

Micron generates nearly all of its revenue from different types of memory chips. DRAM, or dynamic random access memory, chips accounted for 64% of its revenue last quarter. Another 32% came from NAND (flash memory) chips, and the remaining sliver came from other types.

Micron's biggest competitor is Samsung, the world's largest manufacturer of DRAM and NAND chips. Market prices for both types of chips declined significantly last year, due to a supply glut and sluggish sales of smartphones, but are expected to rebound later this year.

How fast are Micron and Lumentum growing?

Lumentum's revenue growth accelerated over the past four years, while Micron's revenue tumbled last year with sliding memory prices.

Revenue Growth (YOY)

2016

2017

2018

2019

Lumentum

8%

11%

25%

25%

Micron

(23%)

64%

50%

(23%)

Source: Company annual reports. YOY = Year-over-year. 

However, Lumentum's revenue only rose 13% annually in the first nine months of fiscal 2020, which started at the end of last June, due to macro headwinds and slower orders from some of its top customers. These top customers were Apple, Huawei, and Ciena -- which generated 21%, 15%, and 14% of its revenues, respectively, in fiscal 2019.

Sales of iPhones have been slowing down, while Huawei's orders slipped after the U.S. Department of Commerce blacklisted the Chinese tech giant on national security concerns. Demand for commercial lasers also declined as COVID-19 and other macro headwinds disrupted global supply chains.

Lumentum offset those declines with new 5G deployments, particularly in China, and brisk sales of chips to data centers -- which are upgrading their infrastructure to support the surging usage of cloud-based apps and services.

Analysts expect Lumentum's revenue and earnings to rise 6% and 19%, respectively, this year, as its growth decelerates in the fourth quarter. For fiscal 2021, its revenue and earnings are expected to rise 9% and 8%, respectively.

Chips on a circuit board.

Image source: Getty Images.

Micron's revenue fell 28% annually in the first six months of fiscal 2020, which started at the end of last August, due to the cyclical declines in DRAM and NAND prices.

Weak demand from the auto, consumer electronics, and smartphone markets -- which were hurt by COVID-19 and macro headwinds -- offset stronger demand from the notebook and data center markets, which benefited from remote work trends and the high usage of cloud services throughout the pandemic. Micron also lost Huawei, which generated 12% of its revenues in 2019, to the trade blacklist.

Micron expects the headwinds it faced in the first half of 2020 to continue into the second half. However, it noted chip supplies were outstripping demand in the data center market, and it still expects NAND and DRAM prices to improve. Analysts expect its revenue and earnings to decline 12% and 61%, respectively, this year, before rebounding strongly in fiscal 2021.

The valuations and verdict

Both stocks look cheap: Lumentum trades at 12 times forward earnings, and Micron has a forward P/E of 10. But they're likely cheap because investors aren't convinced these cyclical stocks have bottomed out yet.

If I had to choose one over the other, I'd pick Lumentum over Micron. Lumentum's core business isn't exposed to violent price swings like the memory chip market is, while Apple's upcoming 5G phones and the growing data center market could generate strong tailwinds later this year.

Micron could be poised for a strong cyclical rebound, but it's less diversified and faces tougher competitors. Therefore, Lumentum is arguably the safer investment for this wobbly market.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.