What: Cracker Barrel's (NASDAQ:CBRL) stock rose 13% in February, according to data provided by S&P Global Market Intelligence.

CBRL Chart

CBRL data by YCharts

The boost contributed to a strong run for shares this year, which are up 19% since January.

So what: February's increase was related to the restaurant and retailing chain's fiscal second quarter results released late in the month. In that report, Cracker Barrel announced soft, but still better-than-expected operating results.

Comparable store sales at its restaurant division improved by 0.6%, marking a deceleration from the prior quarter's 2.5% pop. Traffic fell by a hefty 3%, but Cracker Barrel made up for the decline with higher average spending. As for the retailing side of the business, comps rose 2.6%, a slightly better pace than the prior quarter's 2.4% uptick.

Source: Cracker Barrel.

Profit growth was strong, with adjusted operating income improving to 9.7% of sales from 9.2% a year ago. Management was pleased with the overall performance, given the challenging sales environment. "We continued to deliver positive comparable store sales ... outperform our casual dining industry peers, and delivered earnings at the high end of our expectations," CEO Sandra Cochran said in a press release.

Now what: Two favorable trends are combining to brighten Cracker Barrel's profit picture. First, food price inflation is moderating and lowering costs in the process. Inflation is running at 1%, compared to the 3% the company has recently endured.

Second, diners aren't rejecting higher menu prices: Instead, management projects that comps will rise by about 2% this year despite an average 3% jump in prices.

As a result, Cracker Barrel believes its operating margin will be 9.6% of sales this year, well above the 9.2% it had forecast just three months ago. All else being equal, investors would prefer hefty customer traffic gains to go along with the company's earnings growth. But increased profitability is still good news given sluggish growth in the restaurant and retailing sectors.

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.