COVID-19 hasn't been kind to the economy, cutting second-quarter GDP by 32.9% and throwing as many as 40 million workers out of work -- but not everyone is suffering equally.

From market peak on Feb. 19 to market pit on March 23, the S&P 500 plunged 34%. But Kroger (NYSE:KR) leaned into the crisis, keeping its stores open and adding workers to provide the essential service of putting food in our pantries. And for shoppers who were homebound or wary of venturing outdoors, Kroger ramped up digital offerings such as Clicklist online shopping and same-day grocery delivery -- nearly doubling digital sales in Q2.

A person opens apartment door to retrieve bags of groceries delivered

Kroger stock has been delivering for investors in 2020. Image source: Getty Images.

Despite its valiant efforts to turn crisis into opportunity, not all investors were convinced Kroger would succeed. For six long months, Kroger stock has gyrated wildly as investors battled their instinct to sell everything, but at the same time buy the essential businesses that seemed most likely to survive the recession. Ultimately, Kroger stock did succeed -- first gaining 16% as the market plummeted, then losing it all, then turning around and winning it all back -- and even a bit more.

KR Chart

KR data by YCharts

Kroger stock that entered this year at $29 and change closed north of $34 on Tuesday afternoon, a gain of 18% in eight months -- or about twice the gain the S&P makes in an average year. An investor who bought $10,000 worth of Kroger shares in January would now be sitting on an $1,840 profit -- and own Kroger stock worth $11,840.

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.