The combination of improving earnings, confidence in the economic outlook and cheap money from the Federal Reserve made for a strong 2012 stock market.

In fact, if investors had the courage to stay invested over the past five years in diversified stock funds, they probably had positive annualized returns. That's despite the 50 percent swoon to the bottom of the 2008-09 Great Recession, the "fiscal cliff" and other market-threatening crises in the several-year recovery.

The Bloomberg-Star Tribune 100 index of Minnesota's largest public companies returned 17.6 percent in price appreciation and dividends to shareholders between Jan. 1, 2012, and last Thursday. The five-year annualized return was 5.9 percent.

Sixty-one local companies finished in positive territory compared with 35 that lost value. Several members departed due to mergers or were not public companies for all of 2012.

The S&P 500 index of America's largest public companies returned 19.8 percent to shareholders over the 54-week period ended Thursday and 3.0 percent annualized since 2008. Meanwhile, the Russell 2000 index of smaller public companies posted returns of 20.7 percent and 5.6 percent annualized.

Minnesota boasts several market-beating performers, particularly those connected to the rebounding manufacturing, housing and commercial building sectors.

"The Fastenals, Donaldson, Graco, Pentair, Ecolab, Valspar, these industrial companies that many seem to take for granted have just plugged along and it is surprising how well they have done," said Phil Dow, retired equity market strategist with RBC Financial.

Among Minnesota's top performers over the past 54 weeks and five years:

Stratasys, the 3D-printing manufacturer, which was up about 175 percent, thanks partly to its merger with an Israeli high-tech company. Analysts like the potential for Stratasys-made rapid-prototyping machines that spray and bake plastic into precise replicas of new products. Last year's huge stock run helped Stratasys return 27 percent annually to shareholders since 2008.

Apogee, the architectural glass maker, more than doubled in value last year as the office-and-industrial building market recovered.

Valspar, the globe-spanning paint company, used the recession to restructure, get more efficient and invest in key product lines. Valspar returned 71 percent to shareholders since last January and more than 29 percent annually since 2008. Valspar attributed higher fiscal 2012 profits to higher prices and strong demand for its new protective coatings used on packaging, shipping containers, wood and pipes.

Toro, the maker of lawn, snow and irrigation equipment, saw its earnings clipped by stalled demand for snowblowers during the low-snow winter of 2011-12. But Toro had better sales in its golf-course and professional-landscape businesses. The company's stock is up 48 percent over the past 54 weeks and has returned 15 percent annually to shareholders in price appreciation and dividends over the last five years.

Pentair surged 55 percent in value last year through Thursday, creating a compounded annual return of 13 percent over the last five years, thanks largely to a promising merger with the flow-controls business of Tyco. The expanded Pentair has projected that earnings per share should grow from about $3.10 this year to $5 by 2015 thanks to growing demand for industrial water filtration equipment and pumps, as well as residential-related equipment. Pentair is a play on the water-conservation and reuse theme in a world where fresh water is increasingly scarce.

Expanding Polaris and Arctic Cat, the makers of ATVs and snowmobiles, both provided 60 percent-plus returns to shareholders since the beginning of 2012 and better than 35 percent returns over the past five years. They have gained from new products and a global reach that have helped them grow faster than their markets.

Ecolab, up 28 percent over the last 54 weeks, has returned about 9 percent annually to shareholders over the last five years and surged past its pre-recession stock-price highs, thanks partly to early returns from a big 2011 merger. CEO Doug Baker last week forecast strong 2013 earnings growth, despite the outlook for only moderate revenue increases. The St. Paul-based maker of sanitizing chemicals, water filtration and oil procurement and processing products is wringing cost savings from its December 2011 purchase of Nalco.

About a third of the Star Tribune 100 finished 2012 in negative territory, led by the well-publicized horror stories of Best Buy and Supervalu. Dolan Media, the legal-paper publisher, also has struggled in negative-return territory for the past five years.

So what is the stock market's near-term future?

Mark Henneman, a portfolio manager at St. Paul's Mairs and Power Growth Fund, one of the best national performers for decades with its Upper Midwest buy-and-hold focus, said he believes the S&P 500 could hit 1,500 this year, about a 7 percent return including dividends. The growth fund, which has done well with the sturdy likes of Fastenal, Valspar and others mentioned above, is adding to its positions in Donaldson, Target, Medtronic and St. Jude.

The prognosis from about 10 market strategists interviewed by the Star Tribune over the past month ranges from the S&P 500 closing down to 1,400 this year to achieving 1,700, if earnings accelerate during the year and if President Obama and Congress can agree on a confidence-building debt-reduction package of a few trillion dollars worth of spending cuts over the next decade and tax reform that would yield increased revenue.

The market, fundamentally, is driven by earnings, but investor confidence and expectations play a huge role. And surveys show that many small investors have yet to return to stocks after being burned during the 2008-09 market plummet.

"If there is a plan for gradual federal-debt reduction, that would be favorable to the economy and consumer and investor confidence," said independent economist Dan Laufenberg, a veteran of Ameriprise who now consults with Stonebridge Capital Advisors.

Laufenberg is optimistic that the economy will grow slightly faster than expected, unemployment will drop below 7 percent thanks to job growth and baby boomer retirements, and that the stock market could provide a 7 or 8 percent return this year.

"That may not sound great, but compare it with a 1.9 percent yield on 10-year Treasury bonds," he said.

Staff writer Patrick Kennedy contributed to this report. Neal St. Anthony • 612-673-7144 nstanthony@startribune.com