Stocks extended modest gains by the final hour of trading on Tuesday as crude oil closed above $47 a barrel. 

The S&P 500 added 0.43%, the Dow Jones Industrial Average rose 0.47%, and the Nasdaq gained 0.49%.

Crude oil prices moved higher after an oil worker strike in Brazil continued. The strike has slowed daily output by 25% in the world's ninth-largest oil-producing region. Oil was also on watch ahead of Wednesday's weekly domestic inventories data. West Texas Intermediate crude closed 3.8% higher at $47.90 a barrel on Tuesday.

A surge in Chevron (CVX) and Exxon Mobil (XOM) shares boosted the Dow, while other major oilers including Schlumberger (SLB) , Royal Dutch Shell (RDS.A) , BP (BP) and Total (TOT) added to the S&P 500. The Energy Select Sector SPDR ETF (XLE) climbed 3.1%. 

Factory orders in the U.S. fell 1% in September, narrower than the 2.1% slump recorded in August. Economists had expected orders to decline 0.9%. Excluding transportation, orders fell 0.6%, slightly narrower than a 1.1% decline a month earlier.

Car sales enjoyed a double-digit percentage bump in October. Fiat Chrysler (FCAU) posted a 15% jump in U.S. car sales in October. Its Jeep model, in particular, was a hot seller, posting a 33% sales spike. Sales were also boosted by an October with five weekends compared to four a year earlier.

General Motors (GM) also posted a better-than-expected October. The Detroit automaker reported a 16% increase in car sales compared to an expected 12% increase. Ford (F) sales rose 13.4% last month. However, the reading was slightly lower than an expected 14.2% increase in sales.

King Digital (KING) spiked more than 14% after Activision Blizzard (ATVI) agreed to buy the video game maker in a deal worth a total $5.9 billion. The offer of $18 a share is a 20% premium to King Digital's closing price on Monday. The acquisition brings together Activision, the maker of popular role-playing game Call of Duty, with the creator of mobile app game Candy Crush.

Sprint (S) said its second-quarter loss widened from a year earlier to 15 cents a share from a penny a share a year earlier. Analysts had expected a net loss of 7 cents. The telecom generated revenue of $7.98 billion, below estimates of $8.12 billion. However, wireless net additions rose significantly as promotional efforts paid off. Additions jumped 1.06 million, up from 675,000 a year earlier.

FitBit (FIT) fell more than 6% after announcing that it will offer 21 million shares in a stock offering. The company plans to sell 7 million of its own shares and 14 million from existing shareholders. The wearables company also said lockup restrictions for 2.3 million shares will end on Nov. 4.

Avis Budget (CAR) slumped after missing analysts' quarterly estimates on its top- and bottom-lines. The rental car company earned $1.98 a share, 4 cents below estimates, while revenue of $2.58 billion fell shy by $20 million.

Kellogg (K) fell more than 3% after quarterly sales dropped 9% on a stronger U.S. dollar. Revenue of $3.3 billion fell short of expectations of $3.42 billion. Adjusted profit of 85 cents a share was a penny above estimates.

Archer Daniels Midland (ADM) slipped 6% after reporting quarterly profit of 60 cents a share, a dime below forecasts. The agricultural company said a stronger dollar and weaker ethanol profit margins contributed to the below-consensus results.

AIG (AIG) slid 4% after missing quarterly estimates by a mile. The insurance company earned 52 cents a share, nearly half estimates of $1.03. The company is facing increased pressure to address structural problems after activist investor Carl Icahn pushed for a breakup.

American Eagle Outfitters (AEO) jumped 8% after announcing it had acquired Tailgate Clothing Company for $11 million, a sports line that aligns with the retail chain's brand. The company also said third-quarter comparable-store sales rose 9%.

More from Markets

Why Netflix Stock Is Still a Buy: Shark Tank Star Kevin O'Leary

Why Netflix Stock Is Still a Buy: Shark Tank Star Kevin O'Leary

Netflix Tanks After Weak Subscriber Growth in 'Strong but not Stellar' Q2

Netflix Tanks After Weak Subscriber Growth in 'Strong but not Stellar' Q2

Here's How Shark Tank Star Kevin O'Leary Decides What Stocks to Invest In

Here's How Shark Tank Star Kevin O'Leary Decides What Stocks to Invest In

Netflix, Amazon, Jerome Powell, Walmart and Microsoft - 5 Things You Must Know

Netflix, Amazon, Jerome Powell, Walmart and Microsoft - 5 Things You Must Know

Stocks Drift, Oil Steadies, Dollar Dips as Investors Question Growth Prospects

Stocks Drift, Oil Steadies, Dollar Dips as Investors Question Growth Prospects