Investors' concerns about the economy and health of consumers have grown this year. That's explains why the S&P 500 index has gained 14.5% this year (through Oct. 21), while the S&P 500 Retailing industry group is up just 3.3%.
Still, that doesn't mean you should abandon the retail sector. TJX Companies (TJX 0.59%) remains a standout. In fact, it's one of the sector's best long-term buying opportunities.

Image source: Getty Images.
A business for all seasons
TJX Companies consists of off-price retail stores under the TJ Maxx, Marshalls, HomeGoods, and Homesense brands. Across these banners, it features a broad range of merchandise, such as apparel, footwear, jewelry, furniture, and rugs, acquired at a discount. It passes these savings on to customers, who go to the stores and websites in search of bargains.
While the business has proven itself a long-term winner, it does particularly well during challenging economic times. TJX ends up with access to a greater amount of goods, while price-sensitive customers flock to its stores to get the most out of their budgets.
That's proven true during this cycle. With customers battling persistently high prices and a tough economic climate, the company's fiscal second-quarter same-store sales (comps) increased across all of its divisions, ranging from 3% to 9%. Companywide comps rose 4%.
Notably, it's not merely discounting its merchandise to clear the shelves. The company's quarterly gross margin expanded 30 basis paints year over year to 30.7%, despite facing higher costs from tariffs. TJX Companies' diluted earnings per share grew 15% to $1.10.
The stock has climbed 19.1% this year (through Oct. 21), outperforming the S&P 500's 14.5% gain. During this time, TJX's valuation has become more expensive with its trailing price-to-earnings ratio increasing from 28 to 33.

NYSE: TJX
Key Data Points
That shouldn't dissuade you from buying the stock, though. This top retailer can show resilience when the rest of the retail sector is struggling.