There are very few similarities between action-camera maker GoPro (GPRO -1.12%) and Alphabet (GOOG 0.74%) (GOOGL 0.55%) -- better known as the parent company of Google. The former primarily provides hardware and has been struggling mightily, while the latter is a big-data advertising behemoth.

Perhaps, the only real similarity they have is that they would both be considered technology companies. Beyond that, there isn't too much to tie them together.

Two friends taking a selfie in New York City.

Image source: Getty Images.

That being said, investors have endless possibilities when it comes to where to put their money. With GoPro down so far, and Alphabet having been on a great run, which would be the better stock to buy now?

Of course, we can't answer that question with 100% certainty. But we can examine it through three different lenses to get a better idea of what we're buying. Here's how the two stack up.

Sustainable competitive advantages

Nothing is more important for long-term, buy-to-hold investors than the sustainable competitive advantage -- or "moat" -- a company possesses. While balance sheet and valuation are important -- more on that below -- the moat is paramount.

In its most basic sense, a solid moat is what keeps customers coming back for more, year after year, while holding the competition at bay for decades. It is what separates you from all of your competition.

Alphabet's moat is its data trove. While everyday humans are the ones using Google's seven products with over one billion users -- search, YouTube, Android, Chrome, Play Store, Maps, and Gmail -- advertisers are the ones paying the company's bills. The ubiquity of all seven products allows Google to collect gobs of data that can only be matched by Facebook. Given the ubiquity of all seven products, I don't see anyone else matching Alphabet's data scale.

GoPro, on the other hand, has a much narrower moat. Because it produces a commodity -- whether an action camera or a drone -- competition can come in and offer the same thing for less. That's why brand is so important. Unfortunately, a number of product mis-steps and encroachment from others has shown that GoPro's brand doesn't provide a very wide moat.

Winner = Alphabet

Financial fortitude

Investors in both Alphabet and GoPro are likely excited about growth possibilities. For that reason, they probably like seeing cash being reinvested in future opportunities.

But there's something to be said for keeping a cash stash on hand. That's because every company, at one point or another -- will face difficult economic times. If they have a healthy pile of cash on hand, they will not only survive, but emerge stronger: by buying back shares on the cheap, acquiring rivals, and grabbing market share. Those that are debt heavy are often in peril of filing for bankruptcy.

Keeping in mind that Alphabet is valued at over 400 times the size of GoPro, here's how the two stack up on these metrics.

Company

Cash

Debt

Net Income

Free Cash Flow

GoPro

$75 million

$0

($423 million)

($252 million)

Alphabet

$99 billion

$4 billion

$21 billion

$27.7 billion

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

Clearly, it's a huge bonus that GoPro has zero debt. In fact, without that, the company would likely have been forced to sell itself or declare bankruptcy. Case in point: Just one year ago, there was $280 million in cash on the books versus no debt. While today's balance of $75 million isn't bad, it's a far cry from what it was just 12 months ago.

Alphabet, on the other hand, has a war chest that few can match, and it generates tons of free cash flow.

Winner = Alphabet

Valuation

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

Company

P/E

P/FCF

PEG Ratio

GoPro

N/A

N/A

3.1

Alphabet

28

24

1.5

Data sources: Yahoo! Finance, E*Trade. Morningstar. P/E calculated using non-GAAP earnings when possible.

Here again, we have a pretty easy winner. It's already a strike against GoPro that we can't get a beat on an earnings or cash-flow-based valuation. But it's another in that relative to growth prospects (PEG ratio), Alphabet appears to be trading for a 50% discount as well.

Winner = Alphabet

My winner is...

There you have it: Alphabet wins in a landslide. I used to be a GoPro shareholder, but once commoditization became evident, I checked out of the stock. Alphabet, on the other hand, accounts for 13% of my family's real-life holdings. I suggest you consider putting shares in your own portfolio; as you can see above, you've got three great reasons to do so.