It's earnings season -- and one of the stats that companies are reporting this quarter could trump all the others. No, I'm not talking about profits or sales. I'm talking about cash.

As I write, corporate cash held by companies in the S&P 500 index is hovering near an all-time high. Companies have more than $1.4 trillion in cold, hard cash sitting on the books right now -- and that big bank balance is a very good thing for the companies that hold biggest piles of cash in their coffers.

In fact, historically, the companies with the most cash also tend to generate much bigger returns than the rest of the market. For instance, over the last decade, the top tier of cash-rich stocks worldwide generated total returns of 297%. That's triple what the rest of the S&P earned over the same period.

And it's not hard to see why cash is still king for stock market investors. For starters, cash effectively provides a discount to market participants. Buying stocks with huge cash holdings reduces capital at risk, and creates bargains in stocks that might not seem cheap on the surface.

Cash also provides options. Firms with cash can opt to increase shareholder value by paying a dividend or initiating a share buyback – plus, they have the ability to take advantage of pricey M&A opportunities and internal investments.

To find some attractive investment opportunities in these cash-rich stocks, we're taking a closer look at five of them today.

Apple

AAPL data by YCharts

Image placeholder title

The undisputed king of cash is Apple (AAPL) - Get Report . At last count, this tech giant boasted more than $148 billion in net cash and investments on its balance sheet, enough to pay for a staggering 23% of Apple's market capitalization at current price levels. That's a huge risk reducer for investors right now, even if Apple doesn't exactly have consensus as a "bargain stock" right now.

Apple commands the lion's share of mobile device and PC profits through its iPhone, iPad and Macintosh product lines. One of the firm's biggest assets is its integration of hardware and software, which enable the firm to squeeze better performance out of given technical specs, boosting margins. The Apple ecosystem means that consumers are less likely to jump ship to competing platforms -- high levels of interoperability between devices and sunk costs in app purchases help to encourage loyalty.

The fact that much of Apple's cash is held overseas (and subject to hefty taxes if repatriated) accounts for some of the discount being applied to this stock right now -- but it doesn't tell the whole story. On an ex-cash basis, Apple trades for just 10 times earnings, which is a cheap valuation considering the frothy multiples companies trade for elsewhere in 2015. Like other tech peers, Apple is finally grabbing onto some momentum in October, and that could make it an interesting position to hold into earnings later this month.

Apple is a holding in the Action Alerts PLUS portfolio, co-managed by TheStreet's Jim Cramer. Read his recent take on the stock -- and why he's sticking with it -- here.

Apple also shows up on a list of "10 Stocks That Are Spending Loads of Cash on Buybacks." And for a technical take on the stock, check out "Apple's Stock Chart Reveals Explosive Upside Potential."

Yahoo!

YHOO data by YCharts

Image placeholder title

Yahoo! (YHOO)  is another big technology name that holds a mountain of cash -- and it might be the only company on our list today with a crazier valuation story. Yahoo! has $5.8 billion in cash on its balance sheet today, but it's got another $35 billion in long-term investments (including a huge stake in Alibaba (BABA) - Get Report  that's set to be distributed to investors through a spinoff and 35% of Yahoo! Japan). Once debt is accounted for, Yahoo!'s net cash and investment position adds up to approximately $39.5 billion, or about $8.5 billion more than the entire company is trading for as I write.

Why the big discount? Investors are betting that Yahoo!'s core business continues to destroy shareholder value. But they're ignoring the fact that Yahoo! does still own some of the most popular Web sites on the internet -- and the fact that those sites are still generating substantial revenues today.

Management remains a big question mark at Yahoo!. CEO Marissa Mayer has spent the last few years working to turn the ship around, something that her team still hasn't been able to pull off. While margins are up, Yahoo! still hasn't managed to deliver a killer app to better monetize its 800 million users -- and that's a problem considering the resources management has at its disposal. That said, Yahoo!'s most valuable assets do obfuscate the profitability of the firm's core business, and a spinoff should fix that.

Yahoo! isn't without some big challenges here, but the discount on shares right now is oversized. Look for Yahoo!'s big cash position to lead investors to gains in the months ahead.

Intuitive Surgical

ISRG data by YCharts

Image placeholder title

Shares of Intuitive Surgical (ISRG) - Get Report  are enjoying a post-earnings pop this afternoon, boosted by profits that came in at $5.24 per share; analysts had only been expecting $4.23 on average. But that profit figure is chump change compared with the mountain of cash that Intuitive Surgical has piled on its balance sheet. As of yesterday's update, the firm counts more than $3.1 billion in cash on its balance sheet, and zero debt. That's enough to pay for a whopping 17% of the firm's market capitalization as of yesterday's close.

Intuitive Surgical makes robotic surgical systems for hospitals that want to be able to perform less-invasive surgeries than would be possible if done by a surgeon's hand. The firm's da Vinci system is currently deployed in more than 3,000 hospitals around the globe -- and that huge installed base comes with some big benefits. Since ISRG earns revenues by selling surgical systems and the instruments they use, more machines and more surgeries mean more consumable sales.

Intuitive's big head start on the competition gives it a big advantage over future competitors. Because of the huge installed base and the large number of surgeons trained to use the da Vinci system, switching costs are high. While today's rally is well-deserved following this stock's third-quarter earnings release, it's still pretty cheap once you account for cash.

Expedia

EXPE data by YCharts

Image placeholder title

Last up on our list of cash-rich companies is online travel network Expedia (EXPE) - Get Report . 2015 has been a stellar year for shares of this travel company. Since the calendar flipped to January, Expedia has rallied more than 51%. And that upside momentum isn't showing any obvious signs of slowing as we head into the final stretch of the year.

Expedia is the biggest online travel agency, providing consumers with hotels, flights, rental cars and vacation packages through a wide network of Web sites. The firm's properties include Hotels.com, Orbitz, Hotwire and Travelocity, in addition to its big namesake brand. While online travel has become increasingly commoditized, the combination of Expedia's sheer scale and exposure to more lucrative emerging market travel segments have kept profits growing in recent years.

Calling Expedia "cash-rich" may be a little bit of a misnomer now. That's because the firm just closed its $1.6 billion deal to acquire Orbitz last month. That big buy will obviously change Expedia's balance sheet pretty dramatically when investors get their next update alongside third quarter earnings at the end of the month. But the point is that big cash balances give companies options -- such as buying peers -- and Expedia is taking advantage of that. That's reason enough to keep this stock on the list. As of the pre-acquisition financials, 8% of Expedia's market cap was paid for in cash.

Red Hat

RHT data by YCharts

Image placeholder title

It may sound far-fetched to think that making a free product could land a company on our list of cash-rich stocks -- but it's true. Free stuff is exactly what's propelled shares of yet another tech stock, Red Hat (RHT) - Get Report , to $1.27 billion in net cash and investments, enough to pay for about 8% of the firm's market valuation today. And with shares up 13% so far in 2015, momentum is clearly moving in shareholders' favor this year. Here's why it makes sense to bet on more upside.

Red Hat develops enterprise software, such as its flavor of the Linux operating system, which is used to power a huge share of the world's servers. The firm also develops middleware, storage software and virtualization tools that are complementary to the server OS business. Well, they're complementary and they're complimentary. You see, Red Hat gives away software licenses, but it earns revenues on training and support.

That business model makes sense to budget-conscious IT departments -- the firm's value proposition means that it costs less to deploy a server or workstation with Red Hat's products than with typical closed-source competitors. And a huge installed base and big switching costs puts Red Hat in prime position to profit from the increase in IT infrastructure spending in the next several quarters.

Stay tuned. Investors get their next quarterly update in mid-December.

Disclosure: This article is commentary by an independent contributor. At the time of publication, the author was long Apple.