Pepsi beats Coke thanks to junk food

Pepsi pops and there are food mergers in aisle 11!
Pepsi pops and there are food mergers in aisle 11!

Trump or Clinton? Yankees or Mets? Paper or plastic? Pepsi or Coke? You have to choose one. You can't really like both.

When it comes to soft drinks, many people still prefer Coke. It continues to be the market share leader.

But on Wall Street? That's an entirely different story. Pepsi has outperformed Coke for the past few years. And it looks like that trend won't end anytime soon. Pepsi reported sales and earnings that topped forecasts Thursday. It boosted its outlook too.

Pepsi (PEP) stock popped (get it?) 1.5% on the news. The stock is now up nearly 10% this year. Meanwhile, Coke's stock is down 2%.

If Pepsi's stock continues to rally, it may not be long before the company winds up being worth more than Coke (KO) as well. Pepsi's market value is currently more than $155 billion, about $25 billion less than what Coke is worth.

Pepsi briefly topped Coke's market value in the mid-late 2000s. But Coke has historically held a pretty large lead over its top rival. It looks like that may not last. To quote Bob Dylan, the times they are a changin'.

Both Coke and Pepsi are trying to adapt to changing consumer tastes. Pepsi is trying to appeal to Millennial and Gen X nostalgia with the reintroduction of its Crystal Pepsi clear soda.

But at the same time, both high-calorie soft drinks and diet beverages are falling out of favor. Consumers have caught wise to the fact that diet sodas aren't exactly healthy given the chemicals that are in them.

Related: Diet Pepsi brings aspartame back

As such, carbonated beverages are losing ground to energy beverages, juices and water.

Coke and Pepsi each have a presence in these markets. Coke owns Minute Maid, Dasani and Powerade. It is also the largest shareholder of Monster Beverage (MNST). And Pepsi owns Tropicana, Aquafina and Gatorade.

But Pepsi also has a thriving snacks unit, a growth area that has allowed the company to outpace Coke.

Pepsi's Frito-Lay division, which includes the namesake Fritos and Lay's brands of chips, Doritos, Cheetos and Cracker Jack, is reporting solid growth in sales and earnings as of late.

The profit margins for Pepsi's food business are extremely appetizing to investors. Even though Frito-Lay accounts for just a little more than 20% of the company's overall sales, the division makes up more than 40% of Pepsi's operating profits.

Interestingly, consumers still seem to love salty snacks even though they may be drinking more water and energy drinks and less soda.

The Frito-Lay unit recently partnered with Burger King -- whose parent company (QSR) is backed by Berkshire Hathaway (BRKB) and its unabashed junk food lover CEO Warren Buffett -- to launch Cheetos Chicken Fries.

Related: Roger Enrico, the former 'Cola King' at Pepsi has died

There's an amusing TV commercial for the new product featuring Burger King's trademark monarch and Chester Cheetah (wearing a crown) in a staredown contest.

This is actually the second oddball culinary concoction from the two. Mac 'n Cheetos hit the BK menu in June.

So can Pepsi continue to profit from consumers' love of junk food? It appears that way. Investors need to be a little careful though.

The stock trades at 21 times 2017 earnings estimates, a pretty high price for a company that's only expected to post a profit increase of 8% next year.

Still, Pepsi looks like a bargain compared to Coke, which is actually one of Buffett's top holdings. Coke trades for more than 21 times next year's forecasts too.

But profits are expected to rise only 5% next year. And that follows an earnings decline in 2015 and another expected drop this year.

So even though Buffett may have a thing for Cherry Coke and Coke's stock, he might want to follow the lead of the market and switch to Pepsi instead.

CNNMoney Sponsors