Traders work on the floor of the New York Stock Exchange at the opening bell on August 13, 2019 in New York City
Traders work on the floor of the New York Stock Exchange at the opening bell on August 13, 2019 in New York City GETTY IMAGES NORTH AMERICA / Drew Angerer

U.S. stock indexes climbed on Tuesday as investors returned from a long weekend to scoop up shares of megacap growth and energy companies that were hammered in a rout last week on worries over a global economic downturn.

The three main Wall Street indexes marked their third weekly fall in a row on Friday, and the benchmark S&P 500 posted its biggest weekly percentage drop since March 2020 in the wake of the Federal Reserve's largest interest rate hike in nearly three decades.

Other major central banks including the Swiss National Bank and the Bank of England also increased rates last week, raising concerns that aggressive tightening measures will slow the global economy, possibly causing a recession.

On Tuesday, each of the 11 major S&P sectors advanced in morning trade. Energy was the top gainer, up 4.2%, as oil prices rose almost $2 on high summer fuel demand and tight supplies. [O/R]

Apple Inc and Tesla Inc jumped 3.6% and 8.5%, respectively, boosting the tech-heavy Nasdaq.

Markets have priced in aggressive rate hikes by the Fed in July and September to battle surging inflation amid growing doubts if the U.S. central bank can engineer a soft landing for the economy and avoid a recession.

Goldman Sachs now expects a 30% chance of the U.S. economy tipping into recession over the next year, up from its previous forecast of 15%.

"The market already in a sense may have priced in a shallow recession... you had negative GDP in Q1, so it is possible that the second quarter is negative, in which case the recession could potentially be in the rear-view mirror," said Thomas Hayes, managing member of Great Hill Capital in New York.

All eyes are now on Fed Chair Jerome Powell's testimony to the Senate Banking Committee on Wednesday for clues on future interest rate hikes.

At 9:54 a.m. ET, the Dow Jones Industrial Average was up 472.71 points, or 1.58%, at 30,361.49 and the S&P 500 was up 79.73 points, or 2.17%, at 3,754.57. The Nasdaq Composite was up 280.29 points, or 2.60%, at 11,078.64.

Markets were closed on Monday for Juneteenth holiday.

The CBOE Volatility index, also known as Wall Street's fear gauge, was down to 30.21 points, its lowest level since June 15.

Kellogg Co climbed 3.7% after the breakfast cereal maker said it was splitting itself into three separate companies with a focus on snacking.

Spirit Airlines jumped 6.5% as JetBlue Airways sweetened its bid to convince the ultra-low cost carrier to accept its offer over rival Frontier Airlines' proposal.

Charles Schwab Corp rose 5.1%. UBS upgraded the financial services company's stock to "buy" from "neutral".

Advancing issues outnumbered decliners by a 4.94-to-1 ratio on the NYSE and a 3.40-to-1 ratio on the Nasdaq.

The S&P index recorded one new 52-week high and 30 new lows, while the Nasdaq recorded 30 new highs and 51 new lows.