Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

Advance Auto Parts, AutoZone, and O'Reilly Automotive shares have crushed the markets. Can they continue as the economy grows stronger and new car sales pick up?

Whether it's because credit tightened in the wake of the financial crisis, Americans have less to spend, or the automakers are just making vehicles that last longer, the fact is that the cars on the road today are older than ever. Ford (NYSE:F), General Motors(NYSE:GM), and Chrysler have all struggled in recent years as consumers have held on to their old cars for longer. In August, the average age of vehicles on the road hit an all-time record of 11.4 years.

But those old cars, even if they're made better, still need some occasional maintenance and minor repairs. That's where the aftermarket auto-parts dealers come in. And they've been cleaning up. The nation's publicly traded big players -- Advance Auto Parts(NYSE:AAP), AutoZone(NYSE:AZO), and O'Reilly Automotive(NASDAQ:ORLY) -- have outpaced the S&P 500's 52-week return of 16.83% with gains of 58%, 34%, and 44%, respectively.

But can their market-beating trends continue, or are their best days behind them as the economy picks up and automakers start to see better sales figures?

The way I see it, even if new-car sales increase, that means more cars on the road -- and, thus, more cars that need potential repairs. Economists expect 260 million U.S. vehicles to be in operation by 2018, up from 247 million today. There should be a 2.4% bump just this year.

Of course, newer cars aren't as likely to need major repairs, but it'll take a few years of solid returns from the auto dealers before a significant number of older vehicles are retired. So even in a worst-case scenario, investors have plenty of time to make money here before revenues could significantly decline.

The best thing investors can do is to watch the reports for the number of vehicles on U.S. roads, the average age of those vehicles, and the yearly sales figures for new vehicles -- and use those figures to determine when a possible slowdown for the auto-parts dealers may be on the way.