Financial technology (fintech) company StoneCo (STNE 1.82%) operates in Brazil and had its debut on the U.S. stock market in 2018. Typically, a company like this wouldn't make headlines, being unknown to the majority of U.S. investors. But StoneCo got immediate attention because of an investment from Warren Buffett's Berkshire Hathaway.

According to its most-recent filing, Berkshire Hathaway owns almost 10.7 million shares of StoneCo, or about 3.4% of total shares outstanding, as of the first quarter of 2022. The stake is only worth about $90 million at the time of this writing -- a drop in the bucket for Berkshire Hathaway considering its market capitalization is around $600 billion.

However, Berkshire Hathaway invested way more than $90 million and is currently down big -- a rare occurrence in Buffett's portfolio. In short, StoneCo shattered investor confidence in 2021. But under the surface, this company could be poised for a huge comeback. Here's why.

Why Buffett is down with StoneCo

Berkshire Hathaway got in on the initial public offering (IPO) for StoneCo at $24 per share. So those 10.7 million shares cost Buffet's company over $250 million. Nearly four years later, StoneCo stock is down about 65% from its IPO and more than 90% off its all-time high.

Initially, the business performed well. Net revenue was up 106% year over year in 2018, 63% in 2019, and 29% in 2020 despite the pandemic headwinds. Moreover, it was highly profitable. Its adjusted net profit margin was 21.7%, 33.3%, and 28.9% in 2018, 2019, and 2020, respectively.

With growth and profits, StoneCo stock soared to a lofty valuation. Shares frequently traded at a price-to-earnings (P/E) ratio of 60, extremely high for a financial company. And it even traded as high as 167 times trailing earnings. Investors were extremely bullish.

However, the company ran into problems in 2021 that shattered confidence and sank the stock. First, in the third quarter of 2021 alone, it registered about a $230 million loss due to a bad investment in a bank called Banco Inter, which trades as Inter & Co. Second, StoneCo made a lot of bad loans that hurt cash flow in 2021.

The other problem hampering StoneCo (at least for U.S. investors) is the exchange rate between Brazilian reais and U.S. dollars.

Brazilian Real to US Dollar Exchange Rate Chart

Brazilian real-to-dollar exchange rate. Data by YCharts.

Because dollars are strengthening relative to reais, it makes StoneCo's results look less impressive when you convert the numbers. And it's a macroeconomic problem that could persist as long as Brazil's economy struggles.

Why StoneCo could be poised for a breakout

To assess the health of StoneCo's business, I suggest you start by looking at transaction volumes and customer counts. After all, these metrics are indicative of actual adoption of StoneCo's products and services.

In 2021, the company's base of micro-merchants and small and medium-size businesses increased 140% year over year to 1.7 million. Banking clients increased 190% to 492,000. And total payment volume with its cards was up over 200%. These are very healthy numbers.

StoneCo reported financial results for the first quarter of 2022 on June 2 and showed a continuation of these 2021 trends. Accounts are up, and so are payment volumes. Because of this ongoing growth in the business, first-quarter revenue was up an eye-popping 139% in local currency and hit an all-time high.

Profitability is also rapidly rebounding, which is where things get interesting. To be clear, the company is still working through the aforementioned issues: bad investments, bad loans, and a bad Brazilian economy. But its adjusted net profit margin in the first quarter was 6.4% -- greatly improved from its margin of just 1.8% in the fourth quarter. 

It's possible that as StoneCo works through its problems, it can get back to historical margins. Right now, the company is at roughly an 8 billion reais annualized revenue run-rate. Assuming an adjusted net profit margin of 20% (which is still below historical norms), it would generate 2 billion reais in annual profit, or about $375 million when converted to dollars.

Applying a conservative 10x adjusted profit multiple to that would give StoneCo stock a market cap of $3.75 billion, a 43% premium to where it trades as of this writing. And if the market rewards the stock for its high growth with a higher valuation, the upside would be much higher.

If I lost you in the numbers and jargon, allow me to summarize everything this way: StoneCo stock is down because problems in 2021 hurt its profitability. But now the company is working through its problems, and profitability is improving. If profitability improves to the level it has proved capable of in the past, then the stock is undervalued. And this is why I like StoneCo right now.