Image source: The Motley Fool.

It's time to see if Chipotle Mexican Grill (CMG -1.41%) is getting any closer to a turnaround. The out-of-favor restaurant chain reports its second-quarter results after Thursday's market close.

The market's bracing for a weak report. All 30 of the analysts tracking Chipotle see revenue declining since the prior year's $1.2 billion register tally during the same quarter. The average rests at $1.05 billion, a year-over-year dip of 12%. That's troubling, especially since Chipotle continues to open new units. It makes it fairly certain that Chipotle will post its third consecutive quarter where comps suffer a double-digit percentage decline.  

Wall Street pros are all over the map with their profit projections, but they all see a return to profitability, following the chain's first quarterly deficit as a publicly traded company through the first three months of 2016. They see earnings clocking in as low as $0.13 a share and as high as $1.53 a share. The average there is $0.90 -- well short of the $4.45 a share it earned a year earlier -- but the wide disparity blurs the integrity of the average. A big miss or a big beat wouldn't be a surprise in that scenario.

It's a great time for an upgrade

It's against this backdrop that CLSA analyst Jeremy Scott upgraded the stock on Tuesday. Scott's rating is going from underperform to outperform -- a rare two-notch upgrade that's even more of a head-turning event because it's taking place two days before Chipotle's report. You don't make that kind of big move unless you're confident that you won't have egg on your face when Chipotle begins trading come Friday morning.   

Scott's optimism is based more on the current quarter than the one that will be broken down on Thursday. He's encouraged by Chiptopia, the temporary loyalty rewards program that the chain rolled out earlier this month. Chipotle will reward members of the program with free food after every third or fourth visit in each of the program's three months. Scott feels that Chiptopia will succeed in rebuilding the traffic base that until late last year had made the chain the market darling of the booming fast-casual niche.

He's also encouraged about the data mining aspects of Chiptopia. Chipotle will know a lot more about the dining patterns of its most loyal customers by the time the promotion wraps up by the end of the third quarter.

Chiptopia is a temporary solution, but Scott feels that the burrito roller will follow the lead of other retail food and beverage chains that have embraced permanent loyalty programs. He also feels that the fall national rollout of chorizo will drive business as regulars and non-regulars alike come to check out Chipotle's spin on the savory Spanish sausage that consists of pork and chicken.

It's not all upbeat despite the double upgrade. Scott's price target of $460 doesn't leave a lot of room for upside from here. He's also still concerned about margins that have been contracting as the drop in customer counts and the costs of aggressive promotions squeeze profits on both ends.

Wells Fargo analyst Jeff Farmer also chimed in with a less flattering take. He's lowering his price target on concerns that results on Thursday will fall short of expectations and that Chiptopia's success will be modest at best. However, Farmer's new price target range of $500 to $520 -- it used to be as high as $550 -- is actually rosier than CLSA's Scott at $460.

The turnaround for the 2,066-unit chain won't be easy, but things will hopefully never get as ugly as they did during the first quarter with Chipotle's chunky deficit and the brutal 29.7% plunge in comps. It will be a long road back, but any early signs of Chiptopia's success discussed on Thursday will reward shareholders for their patience. It will be like Chiptopia for investors, but without the free burritos.