Discount retailer Target (TGT) - Get Report  is making smart moves in marketing, product offerings and e-commerce, giving it stronger recent performance than rival Walmart. Target's momentum is likely to continue, making it an excellent investment in a volatile and risky broader market.

Image placeholder title

We'll explore this retailer's recent moves and explain why you should believe in the Target story.

It was an experiment, no doubt, for traditional big-box retailers such as Walmart and Target to open smaller-format stores. While Walmart had to shutter all of its 102 Walmart Express stores recently, however, Target has tasted success with its own smaller-format locations.

Walmart went at it hammer and tong and opened stores in quick succession, but Target pursued a more careful approach that is likely to yield long-term success. Since opening its first TargetExpress in 2014, Target has opened only only five such stores. It also has nine CityTarget locations. This has helped Target tweak its supply chain and logistics to achieve profitability in these formats. 

But perhaps the biggest reason that Target's express stores worked and Walmart's didn't was that each TargetExpress store was customized according to the neighborhood in which it as located, in terms of interiors and merchandise. For example, a store in the neighborhood of a university will not have an extensive range of baby products.

Millennials, or people aged between 20 and 35, have officially become the largest age group in the U.S. labor force. As their spending power increases, it makes sense for brands to seriously target them. And Target is doing just that.

After adding craft beer, Greek yogurt and bagged coffee to its groceries offerings, in an effort to increase its appeal to millennials, Target is now overhauling its clothing line for the demographic. New selections will include designs from names like Lilly Pulitzer.

Millennials seem to have given Target a big thumbs-up on these efforts. Target came in second only to Nike in terms of preferred clothing labels in a survey of millennials by ad agency Moosylvania. It also beat the likes of Alphabet, Amazon and Coca-Cola to come in as the sixth most popular brand among millennials, also in a Moosylvania survey.

You see Jim Cramer on TV. Now, see where he invests his money and why Target stock is a core holding of his multimillion-dollar portfolio. Want to be alerted before Jim Cramer buys or sells TGT? Learn more now.

Investors who have put in their money in Target stock have reaped the benefits of excellent total returns. Recently trading around $83.50, the stock is close to its all-time high. Target also has managed to grow its dividend for 48 consecutive years

While the yield of 2.7% is slightly lower than Walmart's 2.9%, over the last five years, Target has comfortably beaten Walmart in terms of dividend growth.

Same-store sales for Target rose 1.9% year over year in the last quarter, while Walmart's same-store sales grew only 0.6%. Target's adjusted earnings per share grew 11.3% in fiscal 2015, which concluded at the end of January, but Walmart's adjusted EPS declined dramatically year over year.

Meanwhile, Target expects constant-currency revenue to increase at least 3% in the new fiscal year while Wal-Mart is expecting a year of flat sales.

Target is also taking on e-commerce giant Amazon in its fight to stay relevant. Target successfully understood that stepping into the league of Amazon would require it to improve its supply-chain game. It will make investments to the tune of $2.5 billion in technology and logistics by 2017. Target also has brought on board former Amazon executive Arthur Valdez as its executive vice president, chief supply chain and logistics officer.

Free shipping and smooth and seamless shopping on its online platform helped Target record e-commerce sales growth of 34% in the most recent quarter, suggesting that its efforts are paying off. On the other hand, Walmart saw e-commerce sales growth of only 8% in the same period, down from 22% growth in the same quarter a year earlier.

To further leverage e-commerce, Target is looking to hire engineers and product managers for its technology start-up Goldfish.

Target seems to be on the right track, and investors should consider this stock for their long-term wealth building needs.

Ultimate Retirement Guide: Are you making the right investment moves for your retirement, or are you blowing it by making all-too-common money mistakes? There are crucial steps that you should be taking now, to build wealth over the long haul. To find out whether you'll have enough money in your later years, download our free report: Your Ultimate Retirement Guide.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.