“People were worried about interest rates going up, double dips and the housing market falling,” Mr. Levkovich said, just to name a few of the concerns. Those fears have not disappeared, “but a level of optimism has returned. We didn’t go off the cliff.”  So why did stocks do well this year when so much seemed to be going wrong?  One factor, analysts say, was the unexpected surge in corporate earnings throughout the year, helped largely by cost-cutting. Then the government pitched in: The Federal Reserve’s decision in early November to pump $600 billion into the economy by buying Treasury assets, along with tax cuts passed by the lame-duck Congress in December, helped propel a year-end rally, lifting the benchmark S.&P. index by about 6.5 percent in December alone.  On Friday, the Dow Jones industrial average rose 7.8 points, to 11,577.51. That made for an 11 percent gain in 2010. The Standard & Poor’s 500-stock index was less than a point lower, at 1,257.64. The Nasdaq lost 10.11 points, or 0.38 percent, to finish at 2,652.87.  While stocks performed well over all, a small group of listings played an outsize role. Within the S.&P. 500, Mr. Levkovich said, the top 50 performing stocks contributed about 60 percent of the jump in the index.  Technology was again a star, paced by Netflix, up 219 percent, making it the single best performer in the index. F5 Networks, which makes equipment to manage Internet traffic, was No. 2, rising about 146 percent.  Cummins, the engine maker, took third place with a 140 percent gain. Automakers also did well, with Ford rising about 68 percent even as General Motors returned to the stock market in a $23 billion initial public offering, the biggest in United States history.  But many individual investors missed the party, having taken their money out of stocks. They were scared off, it seems, because of the volatility that followed the brief 1,000-point drop on May 6, the so-called flash crash, as well as lingering concerns from the financial crisis of 2008, including a housing and unemployment hangover.  “Investors in general tend to have a reduced tolerance for risk,” said Brian Reid, chief economist of the Investment Company Institute.  The institute estimates that investors withdrew $80 billion from domestic equity mutual funds in 2010, while they added more than $250 billion to bond funds. To be sure, investors still have roughly $4 trillion in domestic stock funds, but that flight from the market is reflected in other figures, like shrinking trading volume.  Total volume was down 16 percent from 2009, and was 24 percent below the levels of 2008, according to Howard Silverblatt, a senior index analyst with Standard and Poor’s. That ate into the results of major banks and brokerage firms, like Morgan Stanley and Charles Schwab, which rely on trading commissions.  The government bond market was precarious as well. Typically, bond prices go up and yields drop when economic growth is anemic, reversing course when economic activity picks up and the threat of inflation reawakens.  Indeed, as it became clear the economy was sputtering in the spring and the European debt crisis worsened, investors began pouring money into bonds, eventually sending yields to all-time lows by early October. The yield on the two-year government bond, for example, fell below 0.4 percent in early October, a record low.  On Friday, the Treasury’s benchmark 10-year note rose 20/32, to 94 13/32, and the yield fell to 3.29 percent from 3.36 percent late Thursday.  But with the announcement of the Federal Reserve’s aggressive asset-purchase program and the extension of Bush-era tax cuts that were due to expire, bonds began to sell off in November and December even as stocks rallied, sending yields higher.  James Caron, head of global interest rate and currency strategy at Morgan Stanley, said 2010 was a year of reversals in the bond market. He added, “You had a 180-degree shift from gloom and doom to optimism.”  For the year, the typical bond fund returned 5.6 percent, according to Morningstar.  Bonds may be a traditional refuge in turbulent markets, but it was gold, a haven for value since ancient times, that really shined. Like bonds, gold benefited from a flight to safety spurred by the European debt crisis. But it also raced higher on fears that budget deficits in Western countries, including the United States, are unsustainable and that lax monetary policies would weaken the value of paper currencies over time.  “People are disenchanted with paper currencies. They want to own something real, and over centuries gold has proven to be real,” Mr. Wien said.  The returns were real too, with the typical gold mutual fund, including mining companies and a range of precious metals, moving higher by 40 percent. Gold itself rose from $1,096.95 at the start of the year to $1,420.78 on Friday. Crude oil, another closely watched commodity, rose from $79.86 a barrel to $91.38 a barrel on Friday, after rising 78 percent in 2009.  Underpinning the rally, most analysts said, were strong earnings, but in what is likely to be a worry for next year, the profits were bolstered by job cuts and other restructuring efforts, rather than revenue growth.  In the third quarter of the year, for example, earnings were 31 percent higher than last year, but revenue increased by just 8 percent. The disparity was even greater in the first quarter, as earnings jumped 58 percent but revenue rose only 11 percent.  With only so much room to cut costs, analysts say that kind of performance will be difficult to repeat, perhaps boding ill for stocks this year. Analysts expect profits to increase by 13.4 percent in 2011, far lower than the estimated 37.8 percent gain for 2010, according to Thomson Reuters.  To make matters worse, Wall Street is brimming with optimism, which in the looking-glass world of investing can actually be a signal to sell.  “The good news has been priced in, and the potential negatives have been ignored,” said Jason Hsu, chief investment officer of Research Affiliates, a money manager in Newport Beach, Calif., that oversees $70 billion in assets. “The market is going to get more nervous at these valuations.”  A version of this article appears in print on January 1, 2011, on Page B1 of the New York edition with the headline: On Wall Street, a Year for the Nervy. Order Reprints| Today's Paper|Subscribe
In 2010, unemployment lingered in America and some European economies tottered, but investing in gold, industrials and many technology stocks turned out well.