When billionaire Warren Buffett took over at Berkshire Hathaway decades ago, it was a dying textile business. It was profitable, but the profits were quickly deployed to fix and upgrade equipment, leaving little for shareholders at the end of the day.

Recognizing the dire situation, Buffett made a hard decision: He let the textile business slowly die and invested in high-quality business with all of the profits that the textile business produced in the meantime.

When possible, Buffett prefers to purchase a high-quality business outright. And Berkshire owns many well-known companies, such as GEICO, Clayton Homes, Fruit of the Loom, Dairy Queen, and more. But sometimes, it can't buy an entire company, and in that case, it invests in stocks.

Berkshire Hathaway has a stock portfolio that's worth roughly $300 billion. Among its holdings are no-brainer investments, such as Amazon, and even new positions, such as Pool Corp and Domino's Pizza.

It may seem strange for a publicly traded company such as Berkshire Hathaway to invest in other publicly traded and privately held companies, but it's a great use of cash when done right and shareholders benefit. Had Buffett stuck with textiles, Berkshire very likely would have gone out of business. But today, it's one of the few companies that's worth over $1 trillion.

I don't know if any investing track record can stand toe to toe with Warren Buffett and Berkshire Hathaway -- their story is extraordinary. But Berkshire isn't the only publicly traded company that owns positions in other companies. Shopify (SHOP -1.62%), eBay (EBAY -1.57%), and Nvidia (NVDA -2.09%) all have portfolios of their own, as well.

1. Shopify

As of September, e-commerce software company Shopify had investments in three publicly traded companies: Global-e Online (GLBE -1.27%), Affirm Holdings, and Klaviyo. These investments are worth roughly $2.3 billion.

Berkshire Hathaway invests solely when it believes it's a good opportunity. By comparison, Shopify invests more when a company has value as a strategic partnership. That's certainly the case with Global-e. This smaller company helps businesses sell directly to their customers across international boundaries.

Shopify features Global-e's software for its millions of merchant customers, giving them options to grow their businesses internationally. Since Global-e is a smaller company, this benefit can't be understated -- it's gained a lot of new business from Shopify. By owning Global-e stock, Shopify can benefit from the upside, as well.

Global-e is still a relatively small company that could have a decade or more of growth ahead of it. If that happens, it will benefit Shopify shareholders, as well, thanks to the company's investment.

2. eBay

It's not in the limelight as much these days, but with 133 million active customers and having processed more than $70 billion in trailing-12-month merchandise volume, eBay is still one of the largest e-commerce platforms in the world. That said, it's not a high-growth business anymore, with revenue only up 3% year over year in the third quarter of 2024. And this has caused management to branch out, looking for ways to advance its business.

In 2020, eBay decided to move on from its classifieds business, selling it to Adevinta. In return, it got a mixture of cash and shares of Adevinta. Over time, eBay has reduced its stake, unlocking cash that it's used to repurchase its shares.

Over the last five years, eBay stock is up about 75% in spite of tepid growth. A large part of this is attributable to reducing its share count by nearly 40% and nearly doubling its dividend. The company likely couldn't have done this without its investment portfolio.

EBAY Average Diluted Shares Outstanding (Quarterly) Chart

EBAY Average Diluted Shares Outstanding (Quarterly) data by YCharts.

In addition to the $1.9 billion investment it still has in Adevinta, eBay also has a position in Adyen, valued at $500 million. After spinning off PayPal, eBay moved to make Adyen its primary payments partner, which was a boost to Adyen. Just like Shopify participating in the upside with Global-e, eBay participates in Adyen's upside through its investment.

3. Nvidia

Finally, Nvidia has a portfolio of six stocks that's worth less than $500 million. Considering the company's own market capitalization is more than $3.4 trillion as of this writing, it's unlikely that any stock in the portfolio will go up enough to move the needle for Nvidia's shareholders. That said, the company has invested in some interesting players in the artificial-intelligence (AI) space, including Recursion Pharmaceuticals (RXRX -3.52%).

While it likely won't move the needle for Nvidia's shareholders, Recursion could have the highest upside of all the stocks mentioned here. The company seeks to harness the power of AI to test drugs synthetically. This cuts down on the time and money in the research process and could possibly bring new drugs to market that would otherwise be cost ineffective.

That said, Recursion could also have the greatest downside. As of this writing, the company hasn't gotten any drugs past the finish line, meaning that its revenue is meager and its losses are great. At its current rate of cash burn, Recursion has about two years of runway. If it can't get a drug approved and reverse its cash outflow, it could be hard for shareholders.

Recursion stock is risky for this reason, but investors still might want to join Nvidia in owning shares. With advancements in AI, it's hard to imagine a future where AI doesn't play an important role, putting Recursion on the right side of trends. And in a diversified portfolio, it can make sense to have a few small investments in more speculative companies such as this.