E-commerce pioneer eBay (EBAY 0.31%) is one of the most underappreciated investment opportunities in the market today. Not only is it a good value, but it also provides a margin of safety from macro-economic issues.

Moreover, eBay is sitting on a whopping $8 billion investment portfolio that's often overlooked by investors sifting through stock metrics, meaning eBay stock is an even better value than it appears at first glance.

Why eBay is a great value stock

eBay had its initial public offering (IPO) in 1998, meaning it's one of the few early internet companies to survive the dot-com bubble. And it survived for good reason. The company has done well at churning out net profits for over two decades, as the chart below shows.

EBAY Net Income (TTM) Chart

EBAY Net Income (TTM) data by YCharts

Over 20 years of net income and high operating margin create confidence that this will continue to be a profitable company going forward. And right now, you can buy eBay stock at a relatively attractive valuation.

According to Yardeni Research, the price-to-earnings (P/E) ratio average for the S&P 500 is 22.1, well above its historical average of 15.5. With eBay, a little context is needed before revealing its P/E because the company got a $13 billion boost in 2021 from selling off some non-core assets. This boost temporarily inflates its net income and artificially brings its P/E ratio down to an absurd value of just 3. 

For this reason, it may be better to consider eBay's cash from operations (what the business itself produced), which was just over $3 billion in 2021. Considering it has a market capitalization of almost $34 billion as of this writing, eBay stock trades at a paltry 11 times its cash from operations, well below the current and historical average P/E valuation of the S&P 500.

Going back to that $13 billion boost, eBay management used it to reward shareholders. In 2021, it bought back $7 billion in stock, which lowers the overall outstanding shares and increases shareholders' piece of the pie.

Right now, eBay is sitting on $8 billion more in long-term investments in e-commerce companies like Adevinta and fintech companies like Adyen. Management could simply continue holding these positions and let them appreciate in value -- not a bad option. Or it could choose to sell these as well, providing it with another pile of cash to reward shareholders.

eBay management is also rewarding shareholders through a dividend. Its yield is low now at 1.6%. However, it only paid out $466 million in 2021 -- a small percentage of its overall earnings. It's been steadily increasing dividend payouts and there's plenty of room to continue doing so.

A person in a home surrounded by shipping boxes holds a tablet and speaks on a phone.

Image source: Getty Images.

Why eBay offers protection from inflation

Ever wonder why gas station prices instantly spike when the price of crude oil is going up? It's because operators need to sell their current supply of gas at a price that's high enough to replace it. 

Inflation is problematic for capital-intensive businesses. Profits today may not adequately cover future expenses. And with inflation at a 40-year high, I don't believe it's a macro-economic issue that investors can ignore. That's another reason to like eBay right now.

eBay is a marketplace business that simply connects buyers and sellers -- it doesn't carry inventory. So eBay is insulated somewhat from inflationary risks. Moreover, it can actually benefit from inflation. As product prices increase, eBay processes higher sales volume, allowing its revenue to increase because its transaction fees are a percentage of the transaction cost. If the cost rises, the fee goes up as well. 

And speaking of high gas prices, consumers are likely to tighten their belts in the coming months as they grapple with rising prices. This could also be to eBay's advantage because of its reputation for bargains. History favors this perspective. The Great Recession in the U.S. was in 2008 and 2009, and eBay grew revenue 11% and 2% respectively in those years, despite the pullback in consumer spending overall.

Don't sleep on eBay's growth potential

Below-average valuations are typically given to dying businesses with zero growth prospects. That doesn't describe eBay. Management is projecting 0% to 3% year-over-year top-line growth in 2022, 5% to 6% in 2023, and 7% to 8% in 2024. While it's not high growth, eBay is far from dead.

eBay's newer initiatives should drive this growth. Advertising revenue is expected to double by 2025 and payment-processing revenue is also padding the top line. And these revenue streams also come with improved profit margins.

The stock market has been volatile lately. If you're looking to get off the roller coaster, consider eBay. Its valuation is dirt cheap, its management is rewarding shareholders, and it's prepared for whatever comes next. This encapsulates why eBay is one of my favorite stocks to buy right now.