New York Stock Exchange workers wear party glasses Monday as...

New York Stock Exchange workers wear party glasses Monday as markets closed the year with gains. The Dow was up 7 percent for 2012; the S&P 500, 13 percent; and the Nasdaq, 16 percent. Credit: Getty Images

If you'd told investors what was going to happen in 2012 -- U.S. economic growth at stall speed, an intensifying European debt crisis, a slowdown in China, fiscal deadlock in Washington, decelerating corporate earnings growth -- and asked how the stock market would perform, few would have predicted a good year.

But that's just what they got.

The Dow Jones industrial average, the Standard & Poor's 500 index and the Nasdaq composite index all ended the year substantially higher, despite losing ground near the end of the year as concerns about the looming "fiscal cliff" mounted.

The Dow gained 7 percent for the year, its fourth consecutive annual advance, having started the year at 12,217. The S&P 500, which started the year at 1,257, is up 13 percent, beating the 7.8 percent average annual gain of the past 20 years. The Nasdaq also logged a better-than-average gain, 16 percent.

Including dividends, the total return on the S&P 500 index was even better: 16 percent.

"There's been a lot thrown at this market, and it's proven to be very resilient," said Gary Flam, a portfolio manager at Bel Air Investment Advisors in California.

Stocks started 2012 on a tear, with optimism about an improving job market and a broader economic recovery providing the backdrop to the S&P 500's best first-quarter rally in 14 years. The index advanced 12 percent by the end of March, closing the quarter at 1,408, its highest in almost four years, with financial companies and technology firms leading the charge. The Dow ended the first quarter at 13,212, logging an 8 percent gain.

In the second quarter, the intensifying European debt crisis and concerns about the impact that it would have on global economic growth prompted a sell-off. By the start of June, U.S. stocks had given up the year's gains. The outlook for growth in China, the world's second-largest economy, also began to weigh on investors' minds.

The second quarter was also marred by Facebook's initial public offering. The stock sale was one of the most keenly anticipated IPOs in years, but investors didn't "like" it. Facebook priced its IPO at $38 per share, and the stock started to fall soon after the first day of trading on concern about the company's mobile strategy. Facebook closed as low as $17.73, on Sept. 4, before recovering some of the ground it lost to close the year at $26.62.

The stock market recovered its poise after the European Union put together loans to bail out Spain's banks in June and European Central Bank chief Mario Draghi pledged to do "whatever it takes" to save the euro. The Federal Reserve's move to start a third round of its bond-purchase program, intended to push longer-term interest rates lower and encourage borrowing and investment, also bolstered stocks.

 

Biggest winners

Manhattan building unstable, evacuated ... Walmart, Sam's Club lower prices on summer items ... Vets' benefits could be cut Credit: Newsday

Jor'Dynn Duncan's mother to sue Suffolk ... Manhattan building unstable, evacuated ... Riverhead postpones Alive on 25 ... America 250: Neighbor vs. Neighbor

Manhattan building unstable, evacuated ... Walmart, Sam's Club lower prices on summer items ... Vets' benefits could be cut Credit: Newsday

Jor'Dynn Duncan's mother to sue Suffolk ... Manhattan building unstable, evacuated ... Riverhead postpones Alive on 25 ... America 250: Neighbor vs. Neighbor

4th of july sale

Digital Access

25¢

for
6 MONTHS

CELEBRATE NOW >Cancel anytime - New subscribers only