Last year was one to forget for auto-parts retailers, and many investors wrote off the sector. While the S&P 500 rose nearly 20%, the best-performing stock, Genuine Parts Company (GPC -0.33%) declined slightly; the most highly regarded stocks in the industry, O'Reilly Automotive, Inc. (ORLY 0.49%) and AutoZone, Inc (AZO 0.96%) declined around 14% and 10% respectively -- and Advance Auto Parts (AAP 3.41%) fell a whopping 41%.

That said, it ain't all over until the fat lady stops needing to repair her car. There's reason to believe that better days are ahead for the sector, with or without competition from Amazon.com (AMZN -1.11%). Let's take a closer look at a sector set for a comeback in 2018.

An abstract of a car made up of auto parts

Image source: Getty Images.

What went wrong in 2017

The industry is essentially in agreement on the causes of the slowdown in sales growth in 2017. According to Advance Auto Parts CEO Tom Greco, three key factors impacted the industry last year:

  • Two consecutive mild winters in 2016 and 2017, and a cooler spring and summer in 2017, have reduced demand for car parts affected by extreme weather conditions.
  • Economic uncertainty for low-income consumers, caused partly by rising gas prices, is seen as reducing the growth rate in miles driven.
  • Unfavorable car demographics are another factor -- more on this in a moment.

The negativity around these issues has helped cause a sell-off in the sector, resulting in the stocks trading at a discount to ratings in recent years:

AAP EV to EBITDA (TTM) Chart

AAP EV to EBITDA (TTM) data by YCharts.

Why it could turn around

There is little the industry can do about unfavorable weather conditions -- something that O'Reilly Automotive's CEO Greg Henslee calls the "single most significant factor that drives variability in our business." But a combination of Trump's tax bill, improving economic growth, a pickup in the jobs market, and moderating growth in gas prices should lead to relative improvement in miles driven.

However, the issue of car demographics is arguably the most interesting bullish point for the future of the industry.

The following chart helps explain the underlying demographics. On the positive side, the average age of a car in the U.S. keeps creeping up -- this should be good news for auto-parts retailers.

However, it's the demographic mix that really matters. In general, a car less than five years old requires little maintenance, while a car five to ten years old hits the sweet spot of the Do-It-For-Me (DIFM) market, and a car more than ten years old is in the sweet spot of the Do-It-Yourself (DIY) market. I'll return to this important distinction shortly.

Average age of U.S. passenger cars, plotted against sales of new passenger cars

Data source: Bureau of Transportation Statistics. Chart by author. Car sales are in thousands and on left-hand scale. Age of automobiles is in years and on right-hand scale.

Note that the slowdown in new car sales in 2008-2009 was eight years ago, suggesting that the DIFM market (which all four have exposure to, though to differing degrees) is facing some near-term weakness because of a dearth of cars in the sweet spot of five to 10 years of age. But here's the thing. The strong increases in car sales in 2010 should lead to "meaningful improvement for industry growth in the future," according to Greco.

Car-parts retailers and DIFM/DIY sales mix

The chart below shows how badly the industry is being impacted by this confluence of factors. Given that the sweet spot of DIFM sales is five to 10 years, it's reasonable to expect the more DIFM-focused retailers like Genuine Parts Company's (GPC) automotive group (which has around 70% to 75% of its sales in the DIFM market) to suffer more, relatively, than the DIY-focused retailers like AutoZone (around 80% of sales to DIY).

Comparable same-store sales growth for the four auto-parts retailers, from Q1 '15 through Q3 '17

Data sources: Company presentations. Chart by author. AutoZone's sales are adjusted to the nearest quarter.

Indeed, as you can see above, GPC's automotive group has seen weak sales growth for some time, while AutoZone has performed relatively better. You can think of O'Reilly Automotive (58% DIY) and Advance Auto Parts (more than 50% DIFM) as having relatively balanced DIFM/DIY sales. The latter's sales growth has also been severely challenged by ongoing transformation, as management is still integrating its 2014 acquisition of General Parts International (Carquest and WorldPac) -- a process that has taken far longer than management expected.

Despite acquisitions and DIFM/DIY sales mixes, all four companies have seen conditions deteriorate.

The Amazon threat

If this wasn't bad enough, the deterioration was accompanied by Amazon's increasing investment in the auto-parts space. It's easy to conclude that Amazon's moves are causing part of the slowdown in the industry. Moreover, the end-market difficulties will be masking any underlying improvements in Advance Auto Parts' turnaround strategy.

While it's never a good idea to write off the impact of Amazon entering a market, the reality is that many DIY customers require in-store service and staff support in order to repair their cars. Meanwhile, DIFM purchases are typically time-sensitive, and it will be very difficult for Amazon to replicate the inventory management and supply-chain logistics necessary to compete with established retailers, in terms of delivering critical parts at short notice to customers.

Will the sector come back to life in 2018?

There's no reason that the calendar year should mark an immediate turnaround in sales for all four companies, but it may mark an improvement in investor sentiment toward the sector. The long-term outlook remains positive for the industry, and the Amazon impact is probably overstated.

Nevertheless, if you are worried about Amazon, then it makes sense to avoid AutoZone, as DIY sales are seen as more at risk and DIFM sales are growing faster than DIY -- partly due to the increasing complexity of cars. Advance Auto Parts has the added complication of successfully executing on its integration plans; this is fine if you want it, but it's not entirely reflective of the investment theme discussed.

All of this leaves Genuine Parts Company and O'Reilly Automotive as the best ways to play this theme. The auto-parts retailers aren't dead yet, and 2018 could mark a recovery in their stock prices.