latest bets are paying off — and a still-growing housing market doesn't hurt either.

Compared with its rival Lowe's, Home Depot will "disproportionately capitalise" on an attractive housing backdrop, London-based Atlantic Equities analyst Sam Hudson wrote in a note to clients Tuesday.

Hudson upgraded the stock to overweight, and raised its price target to $197 a share, up from $168. Following the upgrade, shares of the home improvement company reached an all-time high of $176.77. The stock closed Tuesday at $176.57.

Some of Home Depot's key advantages include its "favourable store footprint and differentiated supply chain, as well as its first-mover advantages in key growth areas (omni-channel, Pro customer)," Hudson added.

For multiple quarters now, . Most recently, the company benefited from a surge in hurricane-related purchases, following a slew of devastating storms.

But another area of strength for Home Depot has been its mobile platform and e-commerce initiatives, including a push into augmented reality.

"We're fortunate to be a good brand that's service-oriented and consumer-focused," Prat Vemana, the vice president of Home Depot's online business, told CNBC Monday. "One of the pivots we made in the mobile app was personalization."

The retailer redesigned its app last year, Vemana explained, which made it more "content driven." In a partnership with Adobe's Experience Cloud division, Home Depot is able to better determine who a shopper is when he or she clicks online, and exactly what he or she is looking for.

A do-it-yourself customer, for example, isn't in the market for the same items as a professional or B2B shopper.

Vemana said engagement on HomeDepot.com is up more than 5 percent since the changes have been implemented, and the app is getting yet another redesign in the near future, which will include more AR functionality. Using the app today, customers can see what a ceiling fan might look like in their house, for example.

"We are only doing things that are useful and purposeful," Vemana said.

Hudson cited the investments as another reason supporting the upgrade.

"HD has invested heavily to improve the efficiencies of its website and mobile apps, while the company has been expanding its delivery capabilities, including pick up in store and deliver from store," Hudson said. "HD was one of the first retailers to start meaningfully investing in an omni-channel strategy, enabling it to develop a differentiated offering."

To be sure, Home Depot isn't the only retailer experimenting with AR in this respect. Lowe's has its own app that allows shoppers to place furniture around their houses, and one that measures objects — as a tape measure would — from a smartphone.

and furniture retailer Ikea's mobile apps have similar features, but overall the industry still looks to be in the early stages of testing these capabilities.

"I think the experiences are much better these days," Vemana said. "There are much more exciting apps to use, and they're getting to the right devices."

The new tools couldn't come at a better time. With the housing market on solid footing, consumers are investing more in their homes.

For fiscal 2017, Home Depot expects total sales to increase 6.3 percent, and comparable sales could rise as much as 6.5 percent.

With Tuesday's gains, Home Depot shares are up more than 30 percent in 2017.