The stock market almost turned out better than expected in 2012.

Before fears of the fiscal cliff spooked investors, the market’s strength caught most of our panel by surprise, with their forecasts calling for a 7 percent rise by the Dow Jones industrial average and a nearly 9 percent increase by the Nasdaq composite index.

Reality turned out to be a mixed bag for investors, with the Dow rising by 6 percent and the Nasdaq jumping by 13.6 percent.

Lawrence V. Whistler, the chief investment officer at Nottingham Advisors in Williamsville, took the honors with the closest Dow forecast, with his prediction that the index would finish the year at 12,950, just 12 points off the mark. Cynthia E. Vance, a certified financial planner at Jensen, Marks, Langer & Vance, also came close, with her forecast of 13,243, missing by just 61 points.

Our panel’s individual stock picks fared pretty well, with the average portfolio of five stocks rising by 11 percent.

Tim Johnston, the managing partner at Sandhill Investment Management in Buffalo , took the honors as the top stock picker. Johnston’s 23 percent gain - almost four times the Dow’s gain - came from three strong picks — flooring and carpet maker Mohawk Industries, hard disc drive maker Western Digital Corp. and investment firm Morgan Stanley — which offset a flat year from aircraft maker Boeing.

Gerald T. Cole, the managing director at Arbor Capital Management in Amherst , came up just short in his bid to repeat as our panel’s top stock picker. His picks rose by an average of 18 percent, thanks to big gains from M&T Bank and an even bigger jump by NCR Corp., offsetting stagnant results from Halliburton and Tim Hortons.