If you want to invest like the pros, I've got some good news for you: Every three months, institutional investors need to disclose their trading activity. This includes Warren Buffett and the holding company he's managed since the 1960s, Berkshire Hathaway (BRK.A -0.16%) (BRK.B -0.20%).

In its latest disclosure, we learned that Berkshire Hathaway bought more than $4.1 billion worth of Taiwan Semiconductor Manufacturing (TSM -1.91%) shares in the third quarter. This is more than a little surprising because Berkshire doesn't have a history of acquiring chipmaker stocks. Moreover, the industry as a whole has been reporting relatively weak demand from electronic device manufacturers.

Why do Buffett and Berkshire find TSMC stock especially attractive during what appears to be a rotten time for its industry? Here's what everyday investors who want to emulate Buffett's success need to understand.

Warren Buffett at a conference.

Image source: The Motley Fool.

Why Buffett likes TSMC stock

Buffett is famously a contrarian investor who takes the long view. He often places large bets on cyclical businesses while they are in the more depressing portions of their respective business cycles. 

Right now, the semiconductor industry as a whole is taking a step back amid relatively soft demand for electronic devices. For example, South Korea recently reported a 29.4% year-over-year drop in semiconductor sales during the first 20 days of November.

The semiconductor industry as a whole may be feeling under the weather, but TSMC's semiconductor foundries have advantages that are keeping them in demand. It's one of just a few companies that can produce chips that are just 7 nanometers or 5 nanometers wide. While the industry as a whole was taking a step back, TSMC reported third-quarter sales that soared 48% year over year and 15% compared to the previous quarter.

TSMC's advantage when it comes to manufacturing smaller chip designs is about to get much stronger. Delivery challenges with its tool supplier have slowed down its rollout of 3-nanometer technology, but the company expects to start mass-producing at this size in the second half of 2023.

A smart buy now?

Recent news that Berkshire is now a shareholder helped lift TSMC stock off from its 52-week low, but it still looks like a bargain at more than 40% below the peak it reached in January. At recent prices, you can buy the stock for just 12.8 times forward-looking earnings expectations.

TSMC's current earnings multiple is appropriate for stocks growing their bottom lines by a low-single-digit percentage each year. If TSMC weren't miles ahead of its competitors when it comes to making highly advanced chips, its valuation would make sense, but this isn't the case. Chip designers are still beating a path to TSMC's door to get their 5-nm products built, and they're even more excited about the company's capacity for 3-nm production that will begin next year.

Despite a challenging environment for the semiconductor industry overall, TSMC reported third-quarter net income that rocketed 80% higher year over year. There are no guarantees that it will continue outperforming the competition, but the company has a clear lead in the lucrative space for tiny chips that looks unassailable for at least another five years -- and possibly much longer.

At recent prices, TSMC's American depository receipts, which are essentially shares of a foreign business that trade on U.S. exchanges, offer a 2.1% dividend yield. Investors will be glad to know the company hasn't reduced its payout in its own currency since implementing an all-cash dividend program in 2009. 

A global recession brought on by soaring interest rates could cause markets to tank and drag TSMC down further than it's already fallen this year. Receiving a steady payout from quarter to quarter will make it a lot easier to hang on for the long run and come out miles ahead, the way Buffett does.

Put it all together, and TSMC looks like a very smart stock to buy now.