The Nasdaq and the S&P 500 indexes rose on Friday and were on track for their biggest monthly gain in nearly 20 months, after upbeat earnings updates from Apple and Amazon and on hopes of a less aggressive monetary policy.

Mega-cap companies have largely fared better this reporting season and are predicting less impact from the current economic turmoil, allaying investor fears that a potential recession could dent their earnings power.

By early afternoon, Apple Inc shares gained 2.9% after the company said parts shortages were easing and that demand for iPhones was unceasing despite consumers tightening other spending. Inc shot up 11.4% after it forecast a jump in third-quarter revenue from bigger fees from its Prime loyalty subscriptions.

The S&P 500 technology index was up 0.7% and looked set to record a 12% gain for the month, its biggest since April 2020.

However, gains on the Dow Jones Industrial Average were capped by Intel Corp, which tumbled 8.9% after it cut annual sales and profit forecasts and missed second-quarter estimates.

Meanwhile, investor worries of bigger interest rate hikes eased a bit on Thursday after GDP data showed the American economy contracted for the second straight quarter.

"Within the context of a bear market phase, we haven't seen the low for 2022 just yet, because headwinds like inflationary pressures, and everything else are still very real," said David Keller, chief market strategist at

The Philadelphia SE Semiconductor index slipped 0.4%, while consumer discretionary stocks jumped 3.4%.

Data showed U.S. consumer spending increased more than expected in June as Americans paid more for goods and services, with monthly inflation surging by the most since 2005.

At 12:09 p.m. ET, the Dow Jones Industrial Average was up 81.34 points, or 0.25%, at 32,610.97, the S&P 500 was up 28.57 points, or 0.70%, at 4,101.00, and the Nasdaq Composite was up 112.19 points, or 0.92%, at 12,274.78.

The three indexes were also set for their second straight weekly gain.

The S&P 500 energy sector jumped 3.9% on gains of 8.2% in Chevron Corp and 4.3% in Exxon Mobil, following their record quarterly revenue on the back of soaring crude prices.

Phillips 66 rose 0.5% after the refiner reported a jump in second-quarter profit.

Procter & Gamble Co fell 5.5% after predicting full-year earnings below analysts' estimates.

Of the 279 S&P 500 companies that have reported earnings so far, 77.8% have exceeded expectations.

Analysts now expect S&P 500 profits to grow 7.6% for the second quarter, up from their 6.8% projection at the start of the three-month period, according to Refinitiv data.

The CBOE Volatility index, also know as Wall Street's fear gauge, hit a 3-month low.

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

The S&P index recorded two new 52-week highs and 33 new lows, while the Nasdaq recorded 42 new highs and 51 new lows.