I'm passionate about the stock market, but given my occupation as a Foolish writer and the advisor of Motley Fool Income Investor, that shouldn't prove a shocker for anyone. But one of the best aspects of this job is that it never gets boring. The market is simply too dynamic to ever become mundane.

Sure, there are occasional periods when nothing really grabs my attention. Of course, maybe that's because there is nothing to grab my attention. Then again, perhaps I just become mesmerized by the slosh of the machine itself, rather than notice the detailed intermingling of the wash. But whatever the case, these moments pass quickly, and I find they're always followed by a day when I marvel at the intricacies that drive stock prices.

Waging war
I recently had such a day. I was casually perusing the latest issue of Fortune when I came across an excellent article by Katrina Brooker titled "The Pepsi Machine." She discussed the age-old rivalry between Coca-Cola (NYSE:KO) and PepsiCo (NYSE:PEP), and she recognized PepsiCo's overall dominance of today's snack and beverage markets. But of more interest to me was her admission that Fortune had quite wrongly predicted PepsiCo's demise and declared Coke the victor of the cola war back in 1996.

I don't say this because I delight in others being wrong. In fact, I would say Fortune was actually half right -- Coke has indeed won the cola war. But the trick to competitive excellence was that PepsiCo recognized it couldn't beat Coke on the cola front, so instead of going mano a mano on the brown sugary stuff, it elected to change the battlefield.

Rather than waste money fighting a war it couldn't win, PepsiCo chose to diminish the very relevance of cola by positioning itself as the key player in every other beverage category. Whether it's Aquafina bottled water, Tropicana fruit juice, Gatorade sports drinks, Lipton Iced Tea, or Starbucks-sponsored Frappuccino, PepsiCo dominates. In effect, it won by giving consumers what they want more than anything else in the world: choice.

The quality versus value challenge
But the true, eye-catching relevance of this situation is not the role reversal of the companies themselves, but the reversal in the importance of two key investment criteria: quality and valuation.

In short, when faced with a choice between two relatively high-quality firms, most investors will simply buy the cheaper competitor. All else being equal, cheaper is better, right? Perhaps, but as most veteran market-watchers know, all else is rarely equal in the world of investing. Thus, the truth is that the relationship between quality and value is relative.

For example, in 1996 Coke appeared to be the higher-quality outfit while PepsiCo was cheaper, so in that instance, valuation proved the more important factor in predicting the winner (i.e., given we now know PepsiCo has been the dominant company since). In 2001, however, PepsiCo appeared to be the better-quality firm while Coke was the cheaper stock, so here, quality proved the more important factor on which to base an investment decision.

The Foolish bottom line
Of course, we absolutely love it when both criteria (higher quality and lower price) apply to the same company -- as appears the case with Bank of America (NYSE:BAC) today -- but clearly that's not always the way of things. Either factor can be the more important one at any given moment. And determining the right time to put your faith in each can mean the difference between a loss and a gain. Something tells me as long as the market presents us with decisions like this, it will never be mundane.

So which is the better choice today? Good question. In truth, they both look attractive from a valuation standpoint. And while today I would give the quality title to PepsiCo because of its immense diversity, as a dividend-loving investor I have to favor Coke's 3% yield (after all, that's money you can count on in good times and bad). Ah, what to do, what to do? Fortunately, unlike in a taste test, we don't always have to make an exclusive choice in the investing arena, and with both of these firms looking fairly attractive on their own merits, it might prove worthwhile to take a sip of each. A little quality and a little value can go a long way to a market-beating return.

Fool on!

Mathew Emmert is generating market-beating returns of his own in the pages of Motley Fool Income Investor. If, like him, you enjoy getting juicy dividend checks each and every quarter, be our guest free for 30 days! There's absolutely no obligation to subscribe.

Mathew drinks gallons of Sobe and Dr. Pepper while writing Income Investor each month -- you have to see it to believe it. He's owned shares of PepsiCo for many years, and he also owns shares of Bank of America. Bank of America is an Income Investor recommendation, Starbucks is a Stock Advisor pick, and Coca-Cola is an Inside Value pick. The Fool has an ironclad disclosure policy.