After lagging the market for years as the company struggled, Target Corporation (NYSE:TGT) stock is finally showing signs of life. The latest leg in the rally came after Target announced its second-quarter earnings. The retail giant beat analyst expectations on both the top and bottom lines. Revenue came in at $17.8 billion, versus the $17.3 billion consensus estimate, while adjusted earnings per share of $1.47 beat the analyst consensus of $1.40.

Man carrying a red shopping basket while looking at his smartphone.

Image source: Getty Images.

In response, shares rose as much as 7% on Wednesday, before ending the day with a more modest 3% gain. Looking beyond the headline numbers, there are signs that Target's turnaround is finally taking hold: most notably, the fact that same-store sales increased by 6.5% during the quarter, easily beating the 4% growth expected. Is it too late to buy into Target's turnaround?

Target is taking advantage of a strong retail environment

While investors should be encouraged by Target's strong showing, it's imperative to recognize that the company is participating in a strong retail environment. In fact, CEO Brian Cornell noted that "this is the best consumer environment" he's seen in his career. The U.S. Census Bureau reported that retail trade sales climbed 6% from the prior year in the three-month period from May through July, a time frame that heavily overlaps with Target's fiscal quarter.

Comp sales growth was aided by the ramp-up in digital sales, with management attributing 1.5 percentage points of the increase to the digital channel. Digital sales are not only growing, but the rate of growth accelerated from 32% in the year-ago quarter to 41% last quarter. There's a trade-off for digital growth, though: margins. In the first quarter, gross margin fell to 29.8% from 30.0% a year earlier, due to increased fulfillment and shipment costs. Sequentially, this figure rose to 30.3% last quarter. However, that was still down from 30.4% in the year-ago period.

Perhaps the most bullish metric was that Target increased foot traffic by 6.4% on a year-over-year basis. Last year, the company committed $7 billion to improve the consumer experience in the digital and storefront channels, and it appears investors have been rewarded with strong performance on both fronts.

No longer a turnaround play, but Target could outperform

Although Target stock has advanced 54% in the last year, the shares continue to be undervalued versus the greater market, just not at the extreme levels they once were. After spending the bulk of last year trading for 12 to 13 times forward earnings, the stock is now valued at 16 times consensus forward earnings, versus 18 times forward earnings for the market as a whole. For this reason, I feel Target can no longer be considered a turnaround stock.

That said, income investors can continue to count on Target's dividend. The stock currently yields just shy of 3%, roughly in line with the 30-year U.S. Treasury bond's current yield. However, Target has increased its dividend every year since 1972, and its current payout estimate of $2.52 for fiscal 2018 is nearly double what it paid out in 2012.

Back in December, I predicted that Target stock would have a strong year in 2018. So far, that has been correct, with shares increasing by 33% year-to-date.

While I still think Target shares can outperform the market due to a better retail environment and success from its $7 billion investment, it's likely that the stock's strong one-year and year-to-date performance will not be replicated, as investors will have higher expectations going forward.

Jamal Carnette, CFA owns shares of Target. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.