Target (TGT 1.03%) has been a divisive stock in recent years. The bulls claimed that its scale and digital growth would help it stay relevant in the shifting retail market, while the bears warned that it could still struggle to keep pace with Amazon.com and Walmart.

However, Target's stock recently surged past $100 per share to an all-time high after its second-quarter report, which silenced the bears and attracted a stampede of bulls. Its revenue rose 4% annually to $18.4 billion, beating estimates by $100 million, as its adjusted earnings jumped 24% to $1.82 per share -- also topping expectations by $0.20.

A Target store under a blue sky.

Image source: Target.

Those headline numbers were impressive, but we should dig deeper and examine the four main reasons Target's second-quarter report crushed the bears.

1. Robust comps growth

Maintaining positive comparable-store sales growth has been tough for many brick-and-mortar retailers. Yet Target's comps growth remained robust over the past year, and its 3.4% comps growth in the second quarter easily topped expectations for 3% growth.

Period Total Comps
Q2 2018 6.5%
Q3 2018 5.1%
Q4 2018 5.3%
Q1 2019 4.8%
Q2 2019 3.4%

Data source: Target quarterly reports.

Target expects its comps in the third quarter and second half of the year to rise 3.4% as well. It attributes that growth to higher traffic at its stores, bigger purchases ("baskets") per shopper, and consistent demand for its apparel, home, beauty, and grocery products. It also saw "encouraging early results" for its back-to-school and back-to-college products near the end of the second quarter.

Target's growth also indicates that its remodeling strategy -- which aims to remodel 300 stores this year with better decor, lighting, displays, and integration with its digital fulfillment services -- is paying off.

The company's robust comps growth was a stark contrast to the gloomy results at Macy's and J.C. Penney, which posted flat and negative comps growth, respectively, in their latest quarters.

2. Robust digital growth

Target's digital comps got a 34% boost during the second quarter and contributed 1.8 percentage points to total comps growth, marking a continuation of its 30%-50% digital comps growth over the past year.

Period Digital Comps
Q2 2018 41%
Q3 2018 49%
Q4 2018 31%
Q1 2019 42%
Q2 2019  34%

Data source: Target quarterly reports.

Target attributed that growth to the rising popularity of its same-day fulfillment services -- Order Pick Up, Drive Up, and Shipt -- which all widen its moat against Walmart and Amazon. It's also using its massive network of brick-and-mortar stores as fulfillment centers to counter Amazon.

An order pickup counter at Target.

Image source: Target.

By comparison, Walmart's U.S. e-commerce sales climbed 37% annually last quarter as Amazon's North American marketplace revenue increased 20%. This indicates that Target is still keeping pace with its biggest digital retail rivals.

3. Expanding margins

Digital growth is often a double-edged sword for retailers, since online promotions and fulfillment expenses can weigh down their margins. However, Target's gross and operating margins expanded annually and sequentially during the second quarter.

Metric

Q2 2018

Q1 2019

Q2 2019

Gross margin

30.3%

29.6%

30.6%

Operating margin

6.4%

6.4%

7.2%

Data source: Target quarterly reports.

Target attributed those improvements to a better mix of higher-margin products on its shelves and new strategies for optimizing costs, prices, and promotions -- which offset its higher fulfillment and supply chain costs. Sales, general, and administrative expenses also accounted for a lower percentage of its revenues compared to the previous year.

That expansion is impressive compared to retailers like Macy's and J.C. Penney, which posted operating margins of 2.8% and 0.6%, respectively, in their second quarters. Walmart's operating margin fell two-tenths of a percentage point to 4.3% last quarter as it ramped up its digital ecosystem and overseas expansion efforts.

4. Rosy earnings guidance

Target expects its consistent sales growth, stable margins, and steady stream of buybacks to boost its adjusted EPS to rise 5% annually (at the midpoint) and 12% for the full year. That third-quarter forecast meets the consensus forecast, while its full-year forecast exceeds estimates.

That guidance makes it one of a handful of retailers that expect positive sales and earnings growth this year. Furthermore, Target increased its store count by 18 over the past year and ended the quarter with 1,853 locations -- making it one of the few retailers still opening stores amid the "retail apocalypse."

But should you chase Target's rally?

At $100 per share, Target trades at about 17 times this year's earnings. That's a bit higher than its projected earnings growth rate, but that slight premium is easily justified by the company's broad-based improvements. Therefore, I believe Target is still worth buying up here, and its forward dividend yield of 3% -- which has been raised annually for over a half-century -- is a nice bonus.