I live on a busy street right outside of Milwaukee. If you look out the window at mid-day, you'd be shocked at just how many packages are being delivered -- daily! -- by Amazon.com. While the company is clearly the leader in e-commerce, you could be forgiven for thinking it's the only player out there.

In truth, though, there are others, like the two companies facing off today: eBay (EBAY 0.88%) and Overstock (BYON -0.96%). And while neither has the momentum that Amazon currently has, both have been around for quite some time. It's worth kicking their tires.

A person shopping on their tablet

Image source: Getty Images

Of course, we can never know with 100% certainty which stock will be sitting higher three years from now. But there are three different lenses through which we can view the question. Each lens offers a better idea for what we're buying when we purchase shares.

Sustainable competitive advantages

Sustainable competitive advantages -- often referred to as a "moat" -- are the most important things a company has. In the simplest sense, this is the facet of a company's business that keeps customers coming back for more, year after year, while spurning rivals the whole way.

While a company's financial statements and valuation (more on those below) are important, nothing will make a bigger difference over the decades-long time frame than a company's moat.

Overstock started out with a brilliant idea: buy the extra merchandise that other retailers had at pennies on the dollar, sell them online for slightly more, and reap the rewards. The problem is that the company was awful at the most crucial part of this business plan: logistics. Customers could never be sure if/when their orders would arrive, and that turned people away from the company.

While it has focused on remedying those issues over the last few years -- and has taken an interesting turn into crypto-currencies -- those early mistakes continue to dog current management.

EBay, on the other hand, benefits from one of the strongest moats in e-commerce: the network effect. From the outset, this has been the number one place to go if you had to buy or sell something, especially on the individual -- not corporate -- level. That means more buyers were lured to the site, which brought in more sellers, and so on. It is a virtuous cycle.

While it's worth watching Overstock's burgeoning crypto-currency play, eBay's network effect is stronger right now.

Winner: eBay 

Financial Fortitude

Investors in both of these companies likely purchase shares because of each one's growth possibilities. While that means we'd like to see cash being used to reinvest in these ventures, there's something to be said for keeping a boring pile of cash on hand.

That's because every company, at one point or another, is going to face difficult economic times. Companies that enter tough periods with cash have options: buy back shares on the cheap, acquire rivals, or -- most potently -- outspend them to gain long-term market share.

Here's how eBay and Overstock stack up in terms of said fortitude, keeping in mind that eBay is valued at 100 times the size of Overstock.

Company

Cash

Debt

Net Income

Free Cash Flow

eBay

$11.3 billion

$6.8 billion

$7.8 billion

$2.2 billion

Overstock

$390 million

$44 million

($7 million)

($13 million)

Data source: SEC filings, Yahoo! Finance, Unilever IR. Net income and free cash flow presented on trailing twelve-month basis.

While each company's balance sheet is solid -- with far more cash than debt -- eBay is bringing in money via free cash flow, while Overstock isn't. That alone is enough to tip the scales in eBay's favor.

Winner: eBay

Valuation

Finally, we have the murky science of valuation. While there's no single metric that can measure if a stock is cheap or expensive, there are a number of data points to consult. Here are five that I like to use.

Company

P/E

P/FCF

PEG Ratio

eBay

19

18

2.3

Overstock

N/A

N/A

2.8

Data source: Yahoo! Finance, E*Trade. P/E calculated using non-GAAP earnings when possible. N/A = Not Applicable

Because it's been a long time since Overstock was profitable on a trailing 12-month basis, it's very hard to make a fair comparison here. Even after we factor in the potential for growth (PEG Ratio), eBay appears to be trading at an 18% discount to Overstock.

Winner: eBay

The winner is...

So there you have it: EBay is the runaway winner here. The company's network effect, positive cash flows, and reasonable valuation all make it a more solid buy than Overstock.