"There's a whole lot of nothing going on. The only standout is energy as a group that's outperforming," said Dan Veru, chief investment officer at Palisade Capital Management.
"I think investors want to be early in the (economy-sensitive) groups. There's a rotation going on in the marketplace. We don't know where the (money) is going to end up, but the strength remains in materials, predominantly the oils," he said.
The S&P 500 ended mildly higher, holding above the psychologically key level of 2,100 reached Monday.
Leading S&P advancers, energy closed about 2.5 percent higher after earlier rising more than 3 percent in a second day of gains for November. Information technology gained about 0.6 percent to surpass materials as the second-best advancer as the close approached.
Materials gained 0.4 percent, while consumer staples was the greatest decliner.
Oil briefly gained more than 4 percent higher in afternoon trade. Crude oil futures settled up $1.76, or 3.81 percent, at $47.90 a barrel.
"Oil is still in a trading range. It's bouncing since the end of August when oil briefly traded below $40. ... There's still not a lot of conviction. Oil's not breaking out here," said Pavel Molchanov, energy analyst at Raymond James. "There's some value buying on the dip going on right now. There is nothing stunning coming out of the energy sector all of a sudden today."
Energy is the worst-performing sector in the S&P 500 year-to-date, down about 10 percent.
The Dow transports ended 0.4 percent lower, with Avis Budget plunging 11 percent to lead decliners. The car rental company lowered its full-year earnings outlook, due partly to currency headwinds.
In economic news, U.S. factory orders fell 1.0 percent in September, a second-straight month of decline, Reuters reported.
Auto sales for October came in at an 18.2 million rate, up from 16.6 million a year ago, Autodata said.
No other major data was scheduled for release Tuesday, ahead of Friday's key nonfarm payrolls report which investors will watch carefully for indications on the timing of a rate hike.
"There's a lot of stocks, IBM, Disney, having a nice small day," said JJ Kinahan, chief strategist at TD Ameritrade.
"I think you're starting to see people trading in anticipation of (Friday's jobs report) already," he said of morning trade, noting lower volume.
Stocks opened lower Tuesday before more than recovering losses to close higher.
Read MoreStreet seeking early clues on year-end rally
Treasury yields continued to climb higher, with the 10-year yield near 2.22 percent and the 2-year yield at 0.76 percent. Both yields hit their highest levels since the Fed held its meeting on Sept. 17.
The U.S. dollar traded higher against major world currencies, with the euro at $1.095 and the yen at 121.98 yen against the greenback.
"The higher Dollar today, especially in G10 is driven almost exclusively by U.S. rates, as the 10-year pushed back above 2.20 percent for the first time since mid-September," Jason Leinwand, managing director at Riverside Risk Advisors, said in an email.
"There is more than a 50 percent chance built into the market now that the Fed will hike in December and that is driving the Dollar higher, especially in the G10 space," he said. "Technically, euro is looking ready to break lower and a strong U.S. nonfarm number on Friday will push the euro back towards $1.0900 and below."
Comments from central bank policymakers are expected on Wednesday, with speeches from Chair Janet Yellen, Vice Chair Stanley Fischer and New York Fed President William Dudley.
On Monday, stocks kicked off the first trading day of November with gains of nearly 1 percent or more that took major averages to key levels. The Dow Jones Industrial Average closed in the green for 2015, joining the S&P 500 and the Nasdaq composite in positive territory for the year so far.