Stocks closed higher on Tuesday, with the Dow Jones Industrial Average posting its longest winning streak in more than six years as traders looked ahead towards Big Tech earnings. The 30-stock average added over 25 points, while the S&P 500 Index and Nasdaq Composite rose 0.3% and 0.6%, respectively.

Here's how the market settled on Tuesday:

S&P 500 Index (SPY  ): +0.28% or +12.82 points to 4,567.46

Dow Jones Industrial Average (DIA  ): +0.08% or +26.83 points to 35,438.07

Nasdaq Composite Index (QQQ  ): +0.61% or +85.69 points to 14,144.56

Making headlines, General Motors (GM  ) shares fell on Tuesday even after the automaker raised its 2023 guidance for a second time this year. The company now sees full-year earnings of $12 billion to $14 billion, up from a range of $11 billion to $13 billion. That guidance, however, is contingent on GM successfully reaching new labor agreements with the United Auto Workers and the Canadian Unifor unions this year without a strike.

"We have a long history of negotiating fair contracts with both unions that reward our employees and support the long-term success of our business. Our goal this time will be no different," CEO Mary Barra said Tuesday in a shareholder letter. "That's the best possible outcome for all our key stakeholders, including our team, plant communities, dealers, suppliers and investors."

General Electric (GE  ) shares rose following its better-than-expected second-quarter earnings on Tuesday. The company also raised its full year guidance, expecting revenue growth in the low-double-digit range from previous estimates for growth in the high-single-digit range.

In economic news, consumer sentiment reached its highest level since July 2021, according to The Conference Board's report on Tuesday. The consumer confidence index came in at 117 in July, up from 110.1 in June. Moreover, the expectations index, which tracks consumers' short-term outlook for income, business, and labor market conditions, rose to 88.3 from 80.0 in June.

"Expectations for the next six months improved materially, reflecting greater confidence about future business conditions and job availability. This likely reveals consumers' belief that labor market conditions will remain favorable," said Dana Peterson, chief economists at The Conference Board, in a statement.

Elsewhere, UPS (UPS  ) shares fell after the shipping company reached a tentative deal with the Teamsters union, successfully avoiding a strike. The agreement is worth $30 billion, according to Teamsters General President Sean O'Brien and includes raises for both full- and part-time works and ends mandatory overtime on drivers' days off.

"Together we reached a win-win-win agreement on the issues that are important to Teamsters leadership, our employees and to UPS and our customers," UPS CEO Carol Tomé. "This agreement continues to reward UPS's full- and part-time employees with industry-leading pay and benefits while retaining the flexibility we need to stay competitive, serve our customers and keep our business strong."

Looking ahead, market participants will react to earnings from Microsoft (MSFT  ) and Alphabet (GOOG  ) (GOOGL  ) after Tuesday's closing bell. Wednesday will also be a big day for Wall Street as traders will digest the Federal Reserve's latest policy decision as well as remarks from Fed Chair Jerome Powell. Wednesday will also bring quarterly results for companies including Coca-Cola (KO  ), Meta Platforms (META  ), Boeing (BA  ) and AT&T (T  ).