The Dow Jones Industrial Average and the Nasdaq hit new intraday records on Tuesday, as industrial and tech shares led gainers.

The Dow rose 0.47% to trade at 20,144. The index record a new intraday high earlier of 20,155. The S&P 500 rose 0.28%, and the Nasdaq gained 0.46% and hit an intraday high of 5,690.  

The industrials sector, up 0.5%, was buoyed by a 1.8% gain for shares in Boeing (BA - Get Report)   and Caterpillar (CAT - Get Report)   , which gained more than 1%. Caterpillar shares rose after the company was upgraded to "overweight" by analysts at Barclays.

Shares of tech companies Apple (AAPL - Get Report) and IBM (IBM - Get Report) also led the Dow higher. Stocks in the consumer staples sector also were rising while shares of energy and materials companies traded lower.

General Motors (GM - Get Report) posted stronger-than-expected fourth-quarter earnings Tuesday and lifted its global car sales estimates for the next four years. Earnings of $1.28 a share beat Wall Street expectations, while revenue rose 11% to $43.9 billion, topping forecasts. Net income fell almost 71% to $1.8 billion from $6.3 billion a year earlier

The automaker sold 10 million vehicles in 2016, up 1.2% from a year earlier. Shares of General Motors fell 4.8% in trading on Tuesday.

GAP (GPS - Get Report) shares fell 0.7% after the San Francisco-based retailer reported that its sales in the fourth quarter and in January rose in what was generally a dismal holiday season for retailers. Same-store sales in January increased 1%, and were up 2% in the fourth quarter. In January 2016, Gap's same-store sales fell 8% and slipped 7% in the fourth quarter of 2015.

Michael Kors (KORS) fell almost 12% after third-quarter same-store sales fell 6.9% and its guidance for fourth-quarter earnings fell below Wall Street forecasts. The retailer posted earnings of $1.64 a share, beating analyst estimates, on revenue of $1.35 billion, which came in below expectations. 

Twenty-First Century Fox (FOXA) shares fell 1.9% after the media company reported a profit of 46 cents a share, beating Wall Street estimates, while revenue of $7.68 billion missed expectations. Revenue in the quarter rose 4.2% on a "record-breaking post-season baseball run" and strong entertainment, series, and news programming, the company said.

BP  ( BP - Get Report)  declined 4.3% in after the oil company missed quarterly earnings expectations. Earnings of 13 cents a share missed analysts' estimates of 16 cents. Revenue rose 3.7% to about $51 billion but came in below forecasts.
 
"We still expect oil demand growth to be strong this year at 1.3 million barrels per day, with modest growth in non-OPEC supply -- which means the timing and extent of market rebalancing depends heavily on OPEC behavior," Bob Dudley, BP group CEO, said on the earnings call. "So while we remain optimistic about the market continuing to rebalance in 2017, we recognize that this could take some time. In short, the road to a more balanced position still has uncertainties."
 
Oil prices in the U.S. Tuesday fell 1.3% to $52.30 a barrel.
 
Others reporting Tuesday include Walt Disney ( DIS - Get Report) , Mondelez International ( MDLZ - Get Report) , Panera Bread ( PNRA) , Buffalo Wild Wings ( BWLD) , Zillow ( Z - Get Report) , Netgear ( NTGR - Get Report) , Take-Two Interactive ( TTWO - Get Report) , Gilead Sciences ( GILD - Get Report) and Yum China ( YUMC - Get Report) .

Panera Bread is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer and the AAP team buys or sells PNRA? Learn more now.

Philadelphia Federal Reserve Bank President Patrick Harker said on Monday that he isn't taking an interest rate hike off the table at the next Fed meeting in March.

"I still am supportive of three rate hikes this year, of course with a major caveat, depending on how the economy evolves and policy, fiscal policy, evolves," Harker said following a speech. "I think March should be considered as a potential for another 25-basis point increase."

On the economic front, the U.S. trade deficit in December fell 3.2% to $44.3 billion. In 2016, the deficit increased slightly to $502.3 billion, the largest since 2012.

Job openings for December decreased slightly to 5.5 million, according to the Labor Department's Job Openings and Labor Turnover Survey.