Wall Street's main indexes rose on Tuesday as earnings season moves beyond big banks, with investors keeping a close watch on the impact of higher inflation on demand even as stronger dollar dents profit.

A soaring U.S. currency led pharma major Johnson & Johnson to trim its annual adjusted profit view and IBM Corp to warn of a nearly $3.5 billion hit.

IBM shares were down 7%, while J&J rose 0.3% as it beat quarterly earnings expectations.

"The stronger dollar becomes the issue and that is going to get a pass this earning season because we'd be more concerned if there was a degradation of demand which we're not seeing," said Art Hogan, chief market strategist at B. Riley.

Apple shares attempted a comeback, gaining 0.2% after shedding 2% in the previous session, when a report said the company planned on slowing hiring and spending growth next year.

Other high-growth stocks such as Tesla Inc, Microsoft Corp, Meta Platforms Inc and Amazon.com Inc were also trading higher.

In the second-quarter earnings season, analysts expect aggregate year-on-year S&P 500 profit to grow 6%, down from the 6.8% estimate at the start of the quarter, according to Refinitiv data.

Spiraling inflation had initially led markets to price in a 100 basis points hike in interest rates in the Federal Reserve meeting later this month, until some policymakers signaled a 75 basis points increase.

At 9:45 a.m. ET the Dow Jones Industrial Average was up 240.23 points, or 0.77%, at 31,312.84, the S&P 500 was up 39.96 points, or 1.04%, at 3,870.81 and the Nasdaq Composite was up 111.99 points, or 0.99%, at 11,472.04.

All of the 11 major S&P 500 sector indexes gained with at least six of them adding more than 1% each.

Boeing Co added 2.6% on plans by private equity firm 777 Partners to buy up to 66 more Boeing 737 MAX jets.

Hasbro Inc beat market estimates for quarterly profit, sending shares of the toymaker up 0.7%.

Netflix shares shed 0.9% ahead of its results after market close.

Meanwhile, the yield on 10-year Treasury notes traded in a narrow range of 2.95% and 3.01%, buoying bets for riskier assets.

Advancing issues outnumbered decliners by a 7.74-to-1 ratio on the NYSE and by a 4.16-to-1 ratio on the Nasdaq. The S&P index recorded one new 52-week high and 30 new lows, while the Nasdaq recorded 11 new highs and 12 new lows.