U.S. stocks advanced on Friday as a jump in oil prices boosted energy stocks and an unexpected rise in July new home sales calmed worries about the economy.

Analysts said investors also were likely hunting for bargains after recent market losses.

Exxon Mobil Corp. jumped 1.9 percent to $85.35, and gave the biggest boost to both the Dow average and the S&P 500, while U.S. crude futures rose $1.41 to $71.24 per barrel. .

I think the new homes sales are pretty positive, said Jim Fehrenbach, head of Nasdaq trading at Piper Jaffray in Minneapolis. If the consumer can come out of subprime OK, then the market will come out of subprime OK.

Also, we're in the fatigue/digestion phase, and people are starting the process of looking for bargains.

The Dow Jones industrial average was up 75.77 points, or 0.57 percent, at 13,311.65. The Standard & Poor's 500 Index was up 8.31 points, or 0.57 percent, at 1,470.81. The Nasdaq Composite Index was up 16.57 points, or 0.65 percent, at 2,558.27.

On Thursday, stocks fell after the CEO of Countrywide Financial Corp, the biggest U.S. mortgage company, said the persistent downturn in the U.S. housing market could lead to a recession.

Sales of new U.S. homes unexpectedly rose 2.8 percent to an annual pace of 870,000 in July, reversing two months of declines, and inventories eased, a Commerce Department report showed. But the Dow Jones U.S. home builder index was still down almost 1 percent.

Earlier, a report showed new orders for long-lasting U.S.-made goods surged much more than expected in July, for the biggest gain in durable goods orders since September. Durable goods include washing machines, refrigerators and other big-ticket products meant to last three years or more.

Shares of big manufacturers, which tend to do well in a stronger economy, were higher. Boeing Co. was up 1.2 percent at $97.90.