Despite a last-hour market sell-off, stocks gained modestly in thin trading volume as the major indices look to be on course for a strong December rally.

The Dow Jones Industrial Average climbed 9.84 points, or 0.09 percent, to 11,585.38. The S&P 500 Index edged up 1.27 points, or 0.10 percent, to 1,259.78. The Nasdaq Composite Index gained 4.05 points, or 0.15 percent, to 2,666.93.

BJ's Wholesale Club Inc (NYSE: BJ) surged 7.08% on press reports that Los Angeles buyout firm Leonard Green & Partners may launch hostile bid for company.

Another retailer, Sears Holdings Corp (Nasdaq: SHLD) soared 6.38 percent after the company said it launched an on-demand video service.

Also, Molycorp (NYSE: MCP) which owns a rare earth mine in California that is expected to go into production next year, jumped 6.80 percent after the Chinese government said it would cut its rare earth exports next year.

Oil futures slipped to $91.04 per barrel, while gold futures rose to $1413.10 per ounce.

Bonds rose as the 10-Year Treasury yield fell to 3.34 percent.