No one is saying that we're living in the golden age of burger-chain stock investing. McDonald's (NYSE:MCD) -- the world's largest restaurant operator in terms of sales volume -- finds its stock actually trading slightly lower in 2018. It's only the beefy dividend that's helping push the investment's overall return up 0.6% year to date through Tuesday's close. 

Burger King parent Restaurant Brands International is faring even worse, serving up a dividend-adjusted decline of 1.3% this year. That leaves Wendy's as the relative speed demon, with a nearly 8% return in 2018. But all that does is push the average return of the "big three" burger flippers to a pedestrian year-to-date return of 2.4%.

Tastier returns can be had in the faster growing "better burger" niche. You can't buy into the two cult darlings in this space, as Five Guys and In-N-Out aren't publicly traded. The next best-known concept would be Shake Shack (NYSE:SHAK), which is faring well with a saucy 43% return. However, even that market-thumping return pales when pitted against a more obscure burger chain that was left for dead last year.

Let me introduce you -- or reintroduce you -- to The Habit Restaurants (NASDAQ:HABT), a stock that's up a scorching 70% so far in 2018.

Exterior of a Habit Burger Grill at night.

Image source: The Habit Restaurants.

Patty cakes

Habit hit the IPO market in 2014 with a tailwind of critical acclaim. A Consumer Reports reader survey issued a year earlier singled it out as the top burger chain in terms of quality of its signature burger, beating out burger heavyweights including Five Guys and In-N-Out. It wasn't enough to make it as hot as Shake Shack's IPO. The typical Habit outlet just doesn't generate that kind of sales volume. However, the stock was doing modestly well -- until 2017. 

Starting lines matter, and Habit can probably thank it's unfortunate standing as one of the worst-performing restaurant stocks of 2017 in helping it become one of this year's biggest winners. After more than a dozen years of consistently positive quarterly comps, Habit's unit-level sales declined last year. The stock followed suit, shedding 45% of its value in 2017. Despite this year's meteoric recovery, Habit still is trading much lower than it did at the end of 2016.

Habit wasn't the only burger joint to struggle with traffic. Shake Shack also suffered through negative comps through most of 2017. The rub for Habit is that shares of Shake Shack, McDonald's, Restaurant Brands, and Wendy's all moved nicely higher last year. Habit was the lost and forgotten.

Investors were bracing for more of the same out of Habit in 2018 when the comps continued to clock in negative through the fourth quarter of last year and this year's first quarter. But Habit surprised the market with a blowout second quarter

Revenue soared 23% for the period, Habit's strongest top-line gain in two years. The chain's heady expansion played a starring role in that surge -- it's up to 231 locations now -- but the most welcome development was a return to positive comps. Comparable-restaurant sales rose a mere 1.2% for the quarter, but it was enough for the company to boost its guidance to the point where it expects positive comps for the entire year. 

Order up

This may seem to be a rough time to run a burger joint. Wages are on the rise, and so are many other input costs. Passing on the increases to consumers through higher menu prices would be a natural solution, but fierce competition and heavy promotional activity are tripping up any potential markups. This may not seem like such a big deal for McDonald's, Restaurant Brands, and Wendy's, which primarily rely on franchisees to bear the escalating cost burdens, but a concept can't thrive if it's independent franchise operators aren't happy. 

The irony here is that Habit and Shake Shack -- the two big winners this year -- actually own most of their locations. All but 20 of Habit's 231 restaurants are company-owned and operated. Habit still has a long way to go to get its stock and its fundamentals back to where they once were, but it's certainly not in the doghouse anymore.

Charburgers for everyone!

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.