It hasn't been easy to be a traditional fast-food chain. Between the shifting relationship Americans have with their food and competition from fast-casual diners, the business isn't what it used to be just 20 years ago.

That being said, fast-food chains are far from dead. And they've been adjusting to this new landscape -- albeit at a pace slower than many investors have hoped for.

People waiting in line at a fast food restaurant

Image source: Getty Images.

Two of the leading chains in this industry face off in today's contest: McDonald's (MCD 0.09%) and YUM! Brands (YUM -0.19%), parent company of Taco Bell, KFC, and Pizza Hut. While it's impossible to say which stock is a better buy with 100% certainty, we can approach the question through three crucial lenses to give us a better idea for what we'd be buying.

Here's how the two stack up.

Sustainable competitive advantages

If I could go back in time, I would tell my beginning-investing self to stop spending so much time studying balance sheets and analyst ratings. Instead, I would spend the majority of my time evaluating a company's sustainable competitive advantages -- commonly referred to as its "moat."

In the simplest sense, this is what makes a company unique -- keeping customers coming back week after week, while the competition is held at bay for decades. In the world of fast-food chains, scale and brand are paramount. Since both McDonald's and YUM are sufficiently big enough, there's not a huge difference when it comes to scale.

That leaves brand as the key differentiator. Forbes estimates that McDonald's has the ninth most valuable brand in the world, worth over $40 billion. None of YUM!'s three chains cracked the top 100.

Additionally, McDonald's clearly has better business momentum, as measured by comparable-store sales (comps) over the past few years.

Comps at Two Fast-Food Giants
Create column charts

From this angle, McDonald's has the clear edge.

Winner = McDonald's

Financial fortitude

Another advantage of owning these companies is that they offer dividends. But while we might want to see those payouts grow exponentially over time, it's wise for any company to keep a healthy cash stash on hand.

That's because every company, at one point or another, will face difficult economic times. Companies that face such times with cash on hand will have options: buy back stock on the cheap, make timely acquisitions, or -- most importantly -- outspend rivals to gain long-term market share.

Those that are debt-heavy are in the opposite boat, forced to narrow their focus and cede market share in an attempt to stay solvent.

Keeping in mind that McDonald's is valued at roughly five times the size of YUM!, here's how the two stack up.

Company

Cash

Debt

Net Income

Free Cash Flow

McDonald's

$3.2 billion

$27 billion

$4.8 billion

$4.0 billion

YUM! Brands

$673 million

$8.7 billion

$1.6 billion

$1.2 billion

Data sources: SEC filings, Yahoo! Finance. Cash includes short- and long-term investments. Net income and free cash flow on a trailing-12-month basis.

To be honest, I'm not a huge fan of either company's debt-heavy balance sheet. McDonald's has the more favorable leverage ratio, but -- relative to size -- YUM! has more net income and free cash flow.

Combine those two factors, and I'm calling this a tie.

Winner = Tie

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

Dividend

FCF Payout

McDonald's

25

30

2.6

2.6%

76%

YUM! Brands

22

21

1.9

1.9%

55%

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

There's not a huge difference between these two, but a winner does emerge. YUM! is a better deal based on every metric but dividend yield. McDonald's is not only more expensive, but it uses more of its FCF to pay its dividend, which -- while it's certainly healthy -- means it has less room for growth.

Winner = YUM! Brands

The winner?

There you have it: It's a draw. McDonald's has a wider moat, while YUM! Brands appears to have a more favorable valuation. Whenever this is the case, I always side with the company who wins the first metric -- sustainable competitive advantage (McDonald's).

That being said, I'm not particularly optimistic about either stock. While they both have massive scale, recognizable brands, and an ability to shift their offerings, they are also fighting against a bigger trend away from fast food. It will be interesting to see if and how they evolve in this new environment, but I'm not putting my own skin in this game.