Down-and-out technology companies are on the menu today. Since membership growth started slowing, shares of Twitter (TWTR) have fallen on tough times -- down 65% since April of 2015. Not to be outdone, Chinese search giant Baidu (BIDU 0.98%) has seen shares dip 30% since the company decided to aggressively plow revenue back into the company's future.

Image source: Getty Images.

Don't be (small-f) fooled, though: Both of these companies have strong fundamentals and very valuable services. Twitter is a globally recognized brand, and Baidu serves the most populous country in the world. So, which is the better buy today? We can't answer that definitively. However, below, we'll try to view the question through three different lenses.

Financial fortitude

As shareholders, we like to see cash being returned to us -- either in the form of dividends or share buybacks. But there's a strong case to be made for keeping a nice cash cushion on the balance sheet.

That's because all companies -- at some point or another -- will experience tough times. When those times arrive, the organizations with cash won't just be unhurt by this, they'll emerge stronger. That's because they can maintain their businesses despite these times, outspend their rivals, buy back shares on the cheap, and even make strategic acquisitions.

Companies with lots of debt are in the opposite boat, forced to narrow their focus to make ends meet, all while being at the whim of creditors.

Here's how Twitter and Baidu stack up in terms of financial fortitude.

Company

Cash

Debt

Net Income

Free Cash Flow

Twitter

$3.7 billion

$1.5 billion

($0.38 million)

$0.42 billion

Baidu

$17.3 billion

$4.7 billion

$4.6 billion

$4.6 billion

Data source: Yahoo! Finance, SEC filings.

Both of these companies have enviable cash-to-debt ratios. Twitter's negative net income has more to do with employee compensation than it does actual profitability. Also, keep in mind that Baidu is valued at five times the size of Twitter.

Having said that, when it comes to free cash flow -- which I consider to be a truer measure of a company's ability to put money in its pocket -- we have a clear winner: Baidu. For that reason, I'm giving it the nod.

Winner = Baidu

Sustainable competitive advantages

A sustainable competitive advantage -- often referred to as a "moat" -- is the most important metric to investigate. In my own investing experience, nothing has been more predictive of my returns than the moat of the underlying businesses.

At its core, a moat is the thing that makes a company unique -- and differentiates it from legions of competitors. Over decades, the moat is what allows a company to compound its gains and offer superior rewards for shareholders.

Twitter's moat arrives via the network effect. For every member who joins, non-members have further incentive to join -- as they have more people to connect with. What fun is it to tweet if no one is there to hear it?

When the network effect is fully functioning, it creates one of the most powerful moats available. For evidence, look to Facebook (META -0.52%), which has over 1 billion users, yet continues to see its numbers jump by double-digits every month. The problem with Twitter is that -- while it is really peerless when it comes to live interaction -- the network effect is stalling, and without significant changes, the growth of users may have reached a ceiling.

Baidu, on the other hand, has several contributors to its moat. First and foremost, the company has enormous search market share in China, especially in mobile. That's important, as the newest users of the Internet in China are jumping on via mobile devices. The company has several other irons in the fire in the form of email, maps, and even taxi services. This builds up a massive data trove that advertisers are willing to pay for.

The X factor for Baidu is the company's reinvestment in its Online-to-Offline (O2O) infrastructure. Put simply, if this plays out, Chinese citizens will look online for something to purchase -- say a movie ticket -- and they'll make that purchase on Baidu's platform (not the movie theatre).

This is advantageous for Baidu -- as the small cut of each transaction adds up quickly at scale -- as well as for merchants, who don't have to invest in the overhead necessary for online payments. Once these customers are locked in, switching costs become high, and Baidu's moat widens.

Add it all together, and I give Baidu the edge here as well.

Winner = Baidu

Valuation

Finally, we have valuation. This is part art, part science...and mostly luck. Here are three data points worth investigating when trying to determine how expensive a stock is.

Company

P/E

P/FCF

PEG Ratio

Twitter

30

29

1.1

Baidu

43

31

2.3

Data source: Yahoo! Finance, E*Trade. P/E represents figures from non-GAAP earnings.

On every metric, Twitter comes out as the cheaper option. This isn't surprising, as Twitter certainly has an enviable platform that -- for one reason or another -- Wall Street thinks is not producing as much as it should.

Winner = Twitter

Final call = Baidu

So, there you have it: Baidu comes out ahead. The company is more financially stable and has a deeper moat, while it may be a tad more expensive than Twitter. Personally, I own shares of both companies, but my position in Baidu is four times larger than my position in Twitter, which matches with what I've observed here.