Last year's laggards might be this year's leaders.

This is what investors hope for when they pick up battered stocks in the beginning of a given year. And as it turns out, it's a long-term winning strategy that has been beating the markets for 30 years.

According to AB Bernstein, buying the stocks that were in the bottom one-third of performers in the during the previous 12 months at the start of the year and screening out the value traps, a term for cheap stocks that never recover to fair value, has produced average annual relative returns of 2.6 percent since 1985.

Bernstein calls this the "enhanced laggard" model, and it has been a winning strategy over the last 10-, 20- and 30-year periods compared to other strategies.

For example, it "would have been a better strategy than the traditional 'Dogs of the Dow' method," Bernstein's Ann Larson said in a note to clients on Thursday.

'Dogs of the Dow' is a simple value investing strategy that calls for buying the 10 stocks with the highest dividend yield in the Dow Jones Industrial Average and holding them for a year. It has outperformed the markets for the past four years straight. The dogs kept investors relatively safe last year, with a flat return of 0.024 percent for the period versus the Dow's nearly 6 percent decline and the ′s 6.2 percent.

However, buying laggards didn't work last year, when the stock market suffered its worst year since the financial crisis. Bernstein's "enhanced laggards" strategy posted a 6.6 percent decline, similar to the S&P 500's performance. Owning leaders, or the top performers in the previous year, was the winning strategy last year, returning 1.4 percent, though over the 30-year time frame it has been less successful than buying the "enhanced laggards."

Kraft Heinz, Celgene and Applied Materials are among last year's biggest laggards, each bleeding more than 30 percent in 2018.