What happened

Kroger (KR -0.43%) stock declined by 31% through the first half of 2017, according to data provided by S&P Global Market Intelligence.

The slump has reduced the performance gap between the supermarket giant and the broader market, but Kroger is still beating the S&P 500 over the past five years.

A shopping cart moving through the grocery aisles.

Image source: Getty Images.

So what

Kroger's 2017 decline came courtesy of two disappointing quarterly reports. First, in early March the company posted declining comparable-store sales that broke an incredible streak of more than 50 quarters of gains. Then in June, Kroger announced another slight comps dip that solidified its sharp departure from the 5% or better comps gains that it had achieved as recently as 2015.

Chart showing declining comparable-store sales.

Chart by author. Data source: Kroger filings.

Now what

CEO Rodney McMullen and his executive team noted that there had been a slight uptick in growth toward the end of the first quarter, and say they remain confident in projecting minor comps gains for the full year. However, the retailer will likely pay a hefty price for protecting its market share in the current promotional sales environment. Kroger is forecasting a profit decline this year as management matches price cuts from rivals. "While this affects gross margin in the short term," CFO Mike Scholtman said in a recent conference call with investors, "it is less expensive than regaining a customer's loyalty."

Kroger's earnings dip in 2017 will take it off track from of its long-term goal of between 8% and 11% annual gains. It overperformed that target in prior years, though, so it can still hold that average -- assuming it continues to gain loyal customers.