NEW YORK (AP) -- U.S. stocks managed some small gains Tuesday, but not enough to make up for big losses from the day before.
Utilities and telecommunications stocks rose the most. General Motors and Ford dropped as their December sales fell short of analysts' estimates.
The Dow Jones industrial average gained 9.72 points, or 0.1 percent, to 17,158.66. The Standard & Poor's 500 index edged up 4.05 points, or 0.2 percent, to 2,016.71. The Nasdaq composite fell 11.66 points, or 0.2 percent, to 4,891.43, as shares of Apple sank 2.5 percent.
Stocks spent most of the day alternating between small gains and losses, and turned positive in the last hour of trading. The relatively stable trading came a day after a plunge in China's main index set off a bout of selling in global markets.
Despite increased tensions in the Middle East, energy prices continued to tumble because demand appears weak while global stockpiles are large. Analysts surveyed by Platts said they believe refining decreased last week and stockpiles will grow again.
U.S. crude fell 79 cents, or 2.1 percent, to $35.97 a barrel in New York. Brent crude, a benchmark for international oils, fell 80 cents, or 2.1 percent, to $36.42 a barrel in London.
The biggest losses belonged to drilling services companies. Ensco lost $1, or 6.3 percent, to $14.89 and Diamond Offshore Drilling decreased $1.05, or 4.8 percent, to $20.80. Transocean and Baker Hughes also fell.
Automakers reported that last month was the best December in the history of the U.S. auto industry, with 1.6 million cars and trucks sold. That helped make 2015 the biggest sales year in the industry's history. But shares General Motors and Ford slumped as their monthly totals fell short of analysts' projections.
Shares of GM fell 88 cents, or 2.6 percent, to $32.43 and Ford declined 25 cents, or 1.8 percent, to $13.72. Auto parts supplier Delphi Automotive gave up $2.33, or 2.8 percent, to $81.66.
Gun makers continued to trade higher as President Barack Obama announced executive actions intended to reduce gun violence and unregulated sales. The prospect of additional background checks and other restrictions often boosts demand for guns.
Smith & Wesson rose $2.58, or 11.1 percent, to $25.86 and Sturm Ruger gained $4.15, or 6.8 percent, to $65.54. Late Monday, Smith & Wesson raised its profit estimates for the year, saying sales were better than it had expected. The stocks also rose Monday because background checks surged in December, suggesting strong sales.
Smith & Wesson has more than doubled over the last year and Sturm Ruger is up 87 percent.
Spirit Airlines jumped after the company replaced CEO Ben Baldanza. Baldanza helped make Spirit into an "ultra-low cost carrier" with low fares and fees for everything from snacks, seat assignments, and space in overhead bins.
The company also became known for splashy promotions and "pre-reclined" seats that couldn't be lowered, letting the company fit more people on its planes. However shares were down by about half over the last year and in November they hit two-year lows.
Spirit gained $2.32, or 5.9 percent, to $41.50.
Fitbit tumbled to a new low as investors were not impressed with the Blaze, its newest fitness tracker. The stock fell $5.46, or 18.3 percent, to $24.30. Fitbit stock began trading at $20 in June and rose as high as $51.90 in August.
The dollar slipped to 118.97 yen from 119.30 yen late Monday. The euro fell to $1.0744 from $1.0827. The yield on the 10-year Treasury note edged down to 2.24 percent from 2.25 percent.
In other energy trading, wholesale gasoline fell 3.4 cents, or 2.6 percent, to $1.257 a gallon and heating oil was nearly unchanged at $1.125 a gallon. Natural gas fell 0.9 cents to $2.325 per 1,000 cubic feet.
Gold edged up $3.20 to $1,078.40 an ounce, silver rose 13 cents to $13.97 an ounce and copper climbed 2 cents to $2.10 a pound.