NEW YORK (AP) – Federal Reserve Chairman Ben Bernanke said what investors wanted to hear, that the economy is indeed on the verge of recovery, and they responded with a rally that sent the major indexes to new highs for the year.

The Dow Jones industrials shot up 155 points Friday, closing above 9,500 for the first time since Nov. 4, and all the big indexes finished with gains of more than 1.5 percent. Meanwhile, Treasury prices tumbled, pushing yields sharply higher, as investors no longer felt they needed the safety of government debt.

The stock market’s gains were broad, reaching across all industries, but the biggest jumps came from energy, industrial and material stocks as oil and commodities prices soared. Bank stocks also rose sharply.

Just nine days after the Fed declared the economy to be “leveling out” rather than contracting, Bernanke went further, saying, “the prospects for a return to growth in the near term appear good.” Speaking at an annual Fed conference in Wyoming, Bernanke did warn that lending is not back to normal, and that the difficulty consumers and businesses are having obtaining loans will be a challenge. But his tone was the most optimistic it has been since the start of the financial crisis.

A bigger-than-expected jump in home sales also gave stocks a boost and helped send bonds lower. The National Association of Realtors said sales of existing homes rose 7.2 percent to a seasonally adjusted annual rate of 5.24 million in July, from a pace of 4.89 million in June.

It was the fourth straight monthly increase and the highest level of sales since August 2007. The rise in sales came amid a sharp decline in home prices.

The day’s news ended a week of erratic trading on Wall Street. Investors have been struggling with concerns about consumer spending, but the combination of Bernanke’s remarks and the home sales data pulled stocks out of the doldrums.

Still, while Bernanke’s positive assessment on the economy was encouraging, the market’s challenges, including rising unemployment and sluggish consumer spending, are certainly far from over. The market appears to be on an upward trajectory, but analysts cautioned that stocks will likely bounce around through at least the rest of the summer.

“The news isn’t going to be all good from here on out,” said Jordan Smyth, managing direct at Edgemoor Investment Advisors in Bethesda, Md.

The Dow rose 155.91, or 1.7 percent, to 9,505.96. The Standard & Poor’s 500 index rose 18.76, or 1.9 percent, to 1,026.13, its highest close since Oct. 6. And the Nasdaq composite index rose 31.68, or 1.6 percent, to 2,020.90, reaching its highest close since Oct. 1.

For the week, the Dow rose 2.0 percent, the S&P 500 gained 2.2 percent, and the Nasdaq added 1.8 percent.

About four stocks rose for every one that fell Friday on the New York Stock Exchange where volume came to 1.48 billion shares.

Bond prices tumbled. The yield on the benchmark 10-year Treasury note, which moves opposite its price, jumped to 3.56 percent, from 3.44 percent late Thursday.

The Russell 2000 index of smaller companies rose 12.83, or 2.3 percent, to 581.51.

In other signs of investors’ growing confidence in the economy, oil prices touched their highest point of the year on hopes that energy demand will soon pick up. After briefly nearly $75, light, sweet crude for October delivery rose 98 cents to settle at $73.89 a barrel on the New York Mercantile Exchange.

And the dollar, which, like Treasurys, is considered a safe-haven asset, tumbled against other major currencies.

While Bernanke’s comments were clearly reassuring for the stock market, investors could quickly lose their optimism if one of their greatest concerns, consumer spending, shows more signs of weakness. The Fed’s upbeat comments last week set off a rally that quickly stalled after a weak reading on consumer sentiment.

Next week, investors will get two key reports on consumer confidence that, if worse than expected, could easily upset the market’s gains.

“We’re not past the volatile stages of the market,” said Lowell Pratt, president of The Burney Co., an equity management firm.

As job losses continue to mount, it will be difficult for consumers to feel comfortable about spending freely.

“Consumer spending normally is the driver of recoveries at the beginning,” said Bob Baur, chief global economist at Principal Global Investors. “That’s not happening this time.”

“At some point, the market is going to ask to see more than just mixed data,” he said. “It’s going to want to see some real jobs produced and an end to job losses and some validation that the consumer isn’t going to stay in a slump.”

Analysts have long warned of an eventual decline in stocks after the market’s massive jump since early March, during which major indexes have risen more than 40 percent off of 12-year lows. But the market has yet to see a significant pullback.

Overseas, Japan’s Nikkei stock average fell 1.4 percent. Britain’s FTSE 100 gained 2.0 percent, Germany’s DAX index jumped 2.9 percent, and France’s CAC-40 soared 3.2 percent.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.