In the current market environment, winning companies riding strong growth momentum appear poised to keep on winning. So it may be worthwhile looking at the stocks that did the best in 2019, rather than the contrarian "dogs" of last year.

Semiconductor manufacturing equipment supplier Lam Research (NASDAQ:LRCX) was the second-best performing stock in the S&P 500 last year, but sold off hard with the rest of its sector at the end of last week. And that's in spite of a really impressive earnings report delivered on Jan. 29, which not only beat analyst expectations across the board, but also gave impressive guidance for the current quarter -- even while factoring in potential coronavirus disruption.

A worker slips a memory chip into a hard drive system while tech-oriented animations swirl around her.

Image source: Getty Images.

Coming out of the trough

Ironically, though Lam Research's stock more than doubled, it saw earnings per share and free cash flow decline in calendar 2019. Chalk it up to Lam proving it can weather a vicious semiconductor down-cycle much better than investors had feared. Though Lam saw non-GAAP (generally accepted accounting principles) EPS decline from $17.44 per share in calendar 2018 to $14.51 in 2019, last year wound up being the second-best year in Lam's history, and its earnings decline was pretty mild by industry standards.

Lam is a main player in equipment that makes memory modules, especially today's stacked NAND flash chips. As many know, late 2018 and most of 2019 saw plunging prices for both NAND flash and DRAM memory. Total DRAM industry revenue fell 37.5% in 2019 on a 47.7% price decline, and NAND flash sales declined 23.1% on a milder fall in ASP, as its downturn started earlier than DRAM's. Thus, basically all of the main memory and storage players cut back significantly on capital expenditures, which means fewer purchases of Lam's equipment.

How Lam did so well

It's impressive Lam only saw its earnings per share decline 16.8% for the year, when many of its clients saw earnings plummet by greater orders of magnitude. There were a few reasons its financials held up so well:

1. Foundry and logic saved the day: Though Lam's memory sector clients were in freefall, its foundry and logic customers stepped up in a big way. That's because 2019 saw a surge in demand for both 5G and high-performance computing chips with smaller form factors and greater power efficiency. Leading chip foundry Taiwan Semiconductor Manufacturing (NYSE:TSM) reacted by increasing its capital expenditures by a whopping 40% in 2019 to increase its leading-edge chip supply, an unexpected benefit for all equipment suppliers, including Lam.

2. Servicing its installed base: When companies don't buy new equipment, they need their old equipment to run more efficiently. Though new equipment purchases fell year-over-year, Lam's installed base grew from 56,000 to 61,000 in 2019, a 9% increase. On the recent conference call with analysts, Lam management said that its productivity upgrades and solutions services business grew 30% last year. Management doesn't break out how much of its revenue comes from services, but it did say that it was "comfortably above 30% in 2019." 

So even in a down year for new equipment sales, Lam was able to blunt the impact by continuing to grow its services business. That should definitely even out further down cycles.

3. Huge buybacks: Finally, Lam's earnings per share also benefited from aggressive share repurchases. In 2019, the company bought back $3 billion in stock. That was even more than its free cash flow, but Lam is fortunate to have a highly profitable business and solid balance sheet, with $4.9 billion in cash and equivalents against only $4.4 billion of debt and finance lease obligations. The aggressive buybacks lowered the average share count by about 7.5%, adding further fuel to EPS.

Looking ahead through the coronavirus

Lam gave more than encouraging guidance for the current quarter, with revenue, gross margin, operating margin, and non-GAAP EPS, all above last quarter's results. And that guidance included some caution around the coronavirus.

Management sees the wafer fabrication equipment industry growing from $46 billion to 47 billion in 2019 to the "mid- to high $50 billion range" in 2020. That roughly 20% increase will come from continued strength in foundry and logic, even after the strong 2019, as well as a return to NAND flash spending, with DRAM following behind NAND. Lam is probably right to be bullish on NAND in the second half of the year; some analysts have even predicted a 40% surge in NAND pricing in 2020.

If not for Corona...

Despite this undeniably bullish report, Lam's stock still sold off at the end of last week over coronavirus fears, and it currently trades at less than 15 times next year's earnings estimates. If the virus does spread more than feared, it could very well delay some purchases and slow down China's economy -- an important region for Lam, accounting for 29% of revenue.

However, any delays should be just that -- delays. Barring a worldwide recession, there's a strong imperative for companies and countries to utilize leading-edge chips for 5G and artificial intelligence applications, which means Lam's products should be in demand for a long time. Though Lam outperformed in 2019, semiconductor equipment stocks still remain some of the cheapest stocks in the technology sector. With management guiding for sequential growth even while incorporating the coronavirus headwinds, Lam looks like a strong pickup for the Foolish long-term investor on the coronavirus-fueled sell-off.

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.