U.S. stocks rose on Tuesday, with major indexes rebounding from recent weakness as corporate earnings continued to come in strong.

What are the main benchmarks doing?

The Dow Jones Industrial Average DJIA, +0.60% rose 123 points, or 0.5%, to 24,431. The S&P 500 SPX, +0.66% added 13 points to 2,816, a gain of 0.5%. The Nasdaq Composite Index COMP, +0.89% was up 39 points, or 0.5%, to 7,669. Both the S&P and the Nasdaq are aiming to end a three-day losing streak, while the Dow has posted two consecutive losing sessions.

The day’s gains were broad-based, with nine of the 11 primary S&P 500 sectors higher. Among the top-performing sectors were industrials, which rose 1.8%, and health care, up 1%.

With Tuesday marking the final trading session for July, the Dow is posting a 4.8% monthly gain, while the S&P and Nasdaq have tacked on 3.6% and 2.1%, respectively. Both the S&P and the Nasdaq are poised for their fourth straight monthly gain.

Don’t miss: After a strong July, August looks ominous for stocks

What’s driving markets?

Investors continued to digest an onslaught of quarterly earnings reports. While the season has generally come in well ahead of expectations, there were some high-profile misses, including from Silicon Valley juggernauts Facebook Inc. FB, +1.70% and Twitter Inc. TWTR, +2.57% Both stocks have tumbled in recent sessions, and the pressure they put on technology stocks have weighed on the broader market.

Not only are tech stocks among the largest in the market, but they have also been among the biggest gainers in 2018, meaning broader indexes could be vulnerable in the event they continue to slide.

Tech will remain in focus throughout the session, as investors await quarterly results from Apple Inc. AAPL, +0.44% , which will be released after the market closes. Shares of Apple rose 0.1%.

What are strategists saying?

“Broadly speaking, earnings are pretty positive, and I don’t think there’s anything out there that’s going to cause a quick downturn that’s going to last. The market will go on digesting bad news, as it has been doing throughout the year, on much worse news,” said Liz Young, senior investment strategist at BNY Mellon Investment Management.

“My opinion has been that there are a lot of overreactions, especially in the tech sector. We’ve seen so much strength there that the sector had room for a correction—they were already feeling frothy—but nothing catastrophic has really come out. I don’t expect things to turn markedly lower for the remainder of the year.”

See also: Prepare for the biggest stock-market selloff in months, Morgan Stanley warns

Which economic reports are on tap?

Consumer spending rose a solid 0.4% in June as foreshadowed by last Friday’s strong report on U.S. economic growth in the second quarter. Analysts had been expecting a 0.5% increase.

Separately, the S&P/Case-Shiller national index rose a seasonally adjusted 0.4% and was up 6.4% for the year in May.

A measure of regional manufacturing activity in Chicago came in at the highest in six months. Chicago PMI rose 1.4 points to 65.5 in July, MNI Indicators said. Any reading above 50 indicates improving conditions.

Separately, a reading of consumer confidence came in at 127.4 in July, compared with 126.5 in the previous month.

Check out: MarketWatch’s Economic Calendar

Federal Reserve policy makers began a two-day meeting. They are expected to signal on Wednesday that more interest-rate hikes are coming, but not at this current meeting.

In other central bank news, the Bank of Japan bucked market expectations and kept its ultra-easy monetary policy, sending the dollar up against the yen USDJPY, +0.76%

Which stocks are in focus?

Pfizer Inc. PFE, +2.98%  reported adjusted second-quarter earnings that beat expectations, along with revenue that was ahead of forecasts. Shares of the Dow component rose 2.9%.

Procter & Gamble Co. PG, +0.12%  reported adjusted fourth-quarter earnings that beat expectations but revenue that was slightly below consensus forecasts. The consumer-products giant also gave a soft outlook for its 2019 fiscal year. Shares rose 0.6%.

Archer Daniels Midland Co. ADM, +0.87% reported adjusted second-quarter earnings and revenue that both came in sharply ahead of expectations. The stock jumped 2.3%.

Cummins Inc. CMI, +3.72%  reported second-quarter earnings that missed expectations, but revenue that was ahead of forecasts. Shares rose 2.4%.

BP PLC BP, +1.80%  reported a jump in its second-quarter earnings, supported by higher oil prices. U.S.-listed shares gained 1.6%.

Lumber Liquidators Holdings Inc. LL, -17.76%  sank 17% after it reported a surprise second-quarter loss, though revenue was ahead of expectations.

Chipotle Mexican Grill Inc. CMG, -5.97% tumbled 6.8% after complaints in Ohio of food-related illness.

Naked Brands Group Inc. NAKD, +34.81%  jumped 33% after it said its subsidiary, Bendon Limited, has joined CVS Health Corp. CVS, -2.28% to bring Heidi Klum Intimates Solutions line to more than 4,000 U.S. locations. Shares of CVS were down 1.5%.

Charter Communications Inc. CHTR, +5.71%  reported second-quarter earnings that beat expectations. Shares of Charter gained 5.5%.

Qualcomm Inc. QCOM, +3.50%  launched a tender offer to repurchase up to $10 billion in stock. Shares rose 4.2%.

Shopify Inc. SHOP, -3.67% fell 6.1% despite reporting second-quarter earnings that beat expectations.

Steve Madden Ltd. SHOO, +0.00%  reported adjusted second-quarter earnings that beat expectations, along with revenue that topped consensus analyst forecasts. Shares rose 0.7%.

Shire PLC SHPG, +0.69% reported a sharp increase in its second-quarter earnings, supported by booking lower costs and higher sales. U.S.-listed shares rose 0.9%.

What are other markets doing?

Oil futures CLU8, -1.65% fell 1.4% while gold futures GCZ8, +0.14% dropped 0.3%. The U.S. dollar index DXY, +0.13% was little changed. European stocks SXXP, +0.18% traded mixed, after Asia finished mixed.

Providing critical information for the U.S. trading day. Subscribe to MarketWatch’s free Need to Know newsletter. Sign up here.