The market is not the economy, the old saying goes. Minnesota would have been in trouble last year if it was.

Major U.S. stock indexes ended a volatile year in nearly the same place they were a year ago, but the share values of Minnesota-based companies tumbled more than those in the broader market.

Shares in only about 20 of the approximately 85 publicly traded companies based in Minnesota finished 2015 better than they did 2014.

One Minnesota company — Xcel Energy Inc. — tipped into the red for the year in the final minutes of trading on Thursday. Xcel shares closed at $35.91, just a penny below their close on Dec. 31, 2014.

The stock performance of Minnesota companies tended to follow their broader sectors, though not uniformly. For instance, shares in Bloomington-based Toro Co. defied the broader sell-off in manufacturing that ensnared other Minnesota-based firms like 3M, Graco, Polaris and Arctic Cat. Toro finished the year up 14.5 percent.

UnitedHealth Group in 2015 passed 3M as the state's most valuable company by market capitalization.

UnitedHealth shares finished the year up 16.4 percent and its market cap was $112 billion. 3M shares fell 8.3 percent and its market cap, which had exceeded $100 billion early in the year, is now about $93 billion.

The best-performing stock in Minnesota in 2015 was Tile Shop Holdings, the Plymouth-based retailer that finished its first full year under new Chief Executive Chris Homeister. The company's shares finished 2015 up 85 percent.

Among the top performers was Vascular Solutions, which experienced a 27 percent increase despite being under indictment in a Texas court over allegations that it advertised one of its medical devices for use that had not been approved by regulators. The company, based in Maple Grove, has denied the charge.

Among Minnesota's poorest-performing stocks were three companies that are in the midst of major operational changes: Evine Live Inc., the Eden Prairie home shopping retailer, Famous Dave's of America Inc., the Minnetonka-based barbecue restaurant chain, and Christopher & Banks Corp., the Plymouth-based women's apparel retailer.

The worst performing Minnesota-based stock last year was Qumu Corp., a provider of digital video archival technology based in Minneapolis. Its shares fell 80 percent despite growing revenue.