Target on Thursday guided its quarterly earnings forecast higher, citing a rise in traffic and sales trends at its stores of late.

Shares of Target Corp. This morning, the company updated its guidance for the quarter now underway, and TGT stock jumped more than 5% on the good news. Retail peers have gotten a boost from the announcement as well. Costco, too, is up around 1%, while apparel retailers like Gap Inc. Even the SPDR S&P Retail ETF (XRT - Free Report) is up 1.4%.

Target said on Thursday it expects a "modest" increase in second-quarter same-store sales, compared with its previous forecast of a low single-digit decline.

Retailers have been struggling to revitalize their business as more shoppers switch from traditional stores to online shopping for bigger discounts and the convenience.

"Following better-than-expected results in the first quarter, we've seen additional, broad-based improvement in traffic and category sales trends in the second quarter, despite continued challenges in the competitive environment", Brian Cornell, chairman and CEO of Target, said in a statement.

At least part of that strategy includes competing with the aforementioned Walmart and Amazon on price ... something the retailer had mostly shied away from in the past, choosing instead to focus on delivering a more premium shopping experience. Earnings are now projected to fall above the high end of its forecast range, which was 95 cents to $1.15 per share. This was also helped by a net tax effect related to its global sourcing operations, Target added.

Target also highlighted initial success in its next-day delivery service called Target Restock, which promises quick delivery of more than 10,000 essential items.

Target will report its official second quarter 2017 earnings results on Wednesday, August 16 before the market open.