The pandemic has not been kind to The TJX Companies (TJX -0.06%). The popular discount retailer posted a 30% sales decrease in the second quarter ended Aug. 1 after a greater than 50% drop in the first quarter ended May 2, and both quarters showed losses. That wasn't so surprising, since the company has a limited digital program that also wasn't available during lockdowns.

Retailers such as Gap (GPS 4.72%) and American Eagle Outfitters (AEO 6.12%) mitigated the coronavirus challenge with strong e-commerce picking up the slack from closed stores. Discount retailers such as Walmart (WMT -0.13%) and Target (TGT 0.06%) thrived during the pandemic selling essential and non-essential merchandise and utilizing both their strong e-commerce systems and curbside pick-up options.

Woman running with shopping bags.

Image source: Getty Images.

While sales at TJX initially picked up as stores reopened, the pace slowed down toward the end of the second quarter. The company said that was partially due to changed consumer behaviors, such as less frequent shopping in stores, and partially due to pandemic-induced logistics problems, such as reduced inventory.

TJX operates several store brands, including T.J. Maxx, Marshalls, and HomeGoods. In its fiscal second-quarter report, released Aug. 19, the company reported a new metric called "open-only comps," which measures comps from stores from the beginning of fiscal 2021 for the days these stores were open. Under that measurement, the HomeGoods segment showed a 20% gain in second-quarter comparable store sales. The home furnishings departments in the other stores also performed well. The company's cash position remained stable, ending the quarter at $6.6 billion.

TJX stock lost almost half of its value in March but has climbed back up and is down 10% year to date as of Monday morning. Shares have returned an annualized rate of 17% over the past three years, and investors, who have pushed the stock price up despite two quarters of losses, seem confident in the company's overall outlook.