Stocks End Higher After Late Rally

Stocks pulled off a gain Tuesday after a late rally as investors scooped up some bargains.

Stocks had started the day higher, then weakened in the afternoon before rallying in the final 10 minutes of trading.

Energy, techs and financials gained, while retail stocks were one of the weakest links after a downgrade on the sector.

The Dow Jones Industrial Average gained 57.14, or 0.6 percent, to close at 9,743.62, after losing 4.5 percent last week. The S&P 500 and Nasdaq rose 0.5 percent and 0.1 percent, respectively.

Investors had already been worried about consumer spending when Citigroup slashed its forecast and price targets on a slew of retailers, including Home Depot , JCPenney , Macy's , Walmart and Target , citing increased risks to the second half consumer-spending recovery. However, it raised its rating on Family Dollar , saying it's a good long-term defensive play. Family Dollar reports earnings on Wednesday.

"The consumer went on a shopping binge in 1Q10 and the subsequent hangover has set in.," Citi analysts said in their research note. "A challenging macro environment, lack of fashion, and difficult comparisons on the horizon will make this consumer hangover tough to kick."

Goldman Sachs also lowered its price targets on several retailers.

This comes ahead of June sales reports from the nation's largest retailers, due out on Thursday. Analysts expect to see a rise of 3.2 percent, according to the latest Thomson Reuters survey, but suggest it may only be a temporary reprieve due to the warm weather and Memorial Day holiday.

A report on the services sector added to the gloomy economic picture: The Institute for Supply Management reports its non-manufacturing index dropped to 53.8 in June from 55.4 in May, but still remained above 50, which indicates expansion in the sector.

But commodity stocks got a boost after the Reserve Bank of Australia gave an upbeat assessment of the global economy. The economic view sparked short covering for higher-risk currencies like the euro, and helped push the dollar broadly lower.

And financials advanced, with Bank of America and Wells Fargo up more than 1 percent, after encouraging news out of the global banking sector.

French banks are expected to pass their stress tests, Bank of France head and European Central Bank Governing Council member Christian Noyer said. This came after similar remarks from French Economy Minister Christine Lagarde.

EU Economy Commissioner Olli Rehn said should member nations exhaust their resources while dealing with problem banks, there is an EU back-up plan they can turn to as a "second line of defense."

And the IPO of China's third largest bank, the Agricultural Bank of China, was met with strong demand — 20 times oversubscribedwith many investors subscribing for double the number of shares they had bid in the pre-marketing process. It is expected to top $22 billion, which would make it the largest IPO ever.

Goldman Sachs shares rose after JPMorgan upgraded its rating on the stock to "overweight," saying Goldman is the best in its class at managing risk.

Chip stocks gave techs a boost, with Intel up nearly 2 percent and Hewlett-Packard up nearly 1 percent, after a report showed global chip sales jumped 48 percent in May to $24.7 billion.

But Applied Materials fell after Piper Jaffray downgraded the stock to "neutral" from "overweight," citing the company's struggle in the solar market.

BP shares rose nearly 9 percent after RBS upgraded its rating on the stock to "buy" from "hold."

Barclays upgraded the overall oil-services sector, saying the outlook for the sector, and deep-water drilling is good, and the 26-percent drop the sector has seen recently more than accounts for the Gulf oil spill. It also upgraded a few individual stocks within the sector, including Halliburton, FMC Technologies, and Pride International.

Walgreen shares rose 1 percent after the drugstore chain reported its sales rose 8.4 percent in June.

Volume was slightly higher than usual, with more than 1.3 billion shares changing hands on the New York Stock Exchange. Advancers outpaced decliners, more than 6 to 5.

This Week:

TUESDAY: World Cup semi-finals start
WEDNESDAY: Weekly mortgage apps; Challenger job cuts; Fed's Kocherlakota, Lacker speak; Earnings from Family Dollar
THURSDAY: June chain-store sales; weekly jobless claims; consumer credit
FRIDAY: Wholesale trade