Shares of both the major home-improvement retailers have been on a tear over the last half decade as the housing market has recovered. Shares of Home Depot (HD 0.02%) and Lowe's (LOW -0.03%) are both up more than 75% over the last three years versus an S&P 500 index that's up only 40%.

But is there a clear winner going forward?
These stocks have traded in-line with each other from a valuation perspective for a number of years. But is that about to change? The two companies appear to be taking different paths for growth. Lowe's is still focusing on opening new stores, while Home Depot has been cutting costs and building up an e-commerce platform. Thanks to this, Home Depot has managed to continue posting same-store sales growth above that of Lowe's.

One of the biggest competitors for both Lowe's and Home Depot is Sherwin-Williams (SHW -0.25%). Sherwin-Williams specializes in paint; however, paint is a product that's relatively easy to come by . It's worth noting that Sherwin-Williams isn't quite as reliant on the housing market as Lowe's and Home Depot. It has exposure to the auto market and is seeing sales growth from improved demand for auto finishes.

Earlier this month, Sherwin-Williams reported fiscal first-quarter results. Its earnings came in at $1.26 a share , which was a record high for a quarter and handily beat consensus estimates of $1.12 a share . One of the key drivers for this stellar quarter was strength in its paint stores. Sherwin-Williams managed to add nearly 400 stores in 2013. But that store growth is expected to fall to just 90 store openings for 2014.

A new approach to stores is a big positive
Home Depot has more than 2,200 stores, versus Lowe's 1,700 store base . Sherwin-Williams dwarfs both with 3,900 stores, but that's in large party because Sherwin-Williams' stores are generally much smaller than Home Depot and Lowe's stores. However, it'll take more than just store growth to drive earnings growth over the long term.

The housing rebound will eventually slow, but Home Depot is already planning for this. The biggest part of this is optimizing its supply chain and focusing on e-commerce sales. About 40% of its capital expenditures for this year will go toward technology spending.

Home Depot is benefiting from a slower store-expansion strategy. As mentioned, it is focusing on e-commerce. This is a big positive, as it lets Home Depot enter markets that won't accommodate large stores. It's also a positive considering that a large part of the population is moving to cities (urban areas) and staying. So instead of moving back to rural areas to raise families, they choosing to stay in urban parts of the state.

Thus, this year, Home Depot will only open one regular store. Compare this to the 200-plus stores a year that Home Depot was opening prior to 2008. Meanwhile the company will be opening two distribution centers to serve its e-commerce platform in 2014. 

The recent acquisition strategies for Home Depot and Lowe's show just how different the home-improvement stores are becoming. Lowe's recently bought Orchard Supply Hardware Stores, which increased its retail presence. Home Depot's recent buy was blinds.com, which gives it a larger presence in e-commerce.

How shares stack up
Home Depot trades at a P/E of 15 based on next year's earnings estimates, right in-line with Lowe's. The case for a premium valuation on shares of Home Depot can be made, considering that Home Depot has a return on equity that's nearly double Lowe's. Home Depot's return on equity is an impressive 35%, compared to 17% at Lowe's.

Home Depot's P/E-to-growth (PEG) ratio is right at 1. Lowe's is also close to 1, but Sherwin-Williams' PEG ratio is 1.6. Meanwhile, shares of Home Depot are underperforming Lowe's and Sherwin-Williams, but its 2.4% dividend yield towers over both competitors.

Bottom line
Home Depot has been focusing on strategic store placement and growth in its technology, unlike Lowe's, which is taking a store growth and increase in promotions strategy. The problem for Lowe's is that it will eventually hit a saturation point, and promotions tend to squeeze margins. For investors looking to play any remaining bounce in the housing market, as well as the long-term opportunities in e-commerce, Home Depot is worth a closer look.