Stocks rose further on Friday as Wall Street completed its best month since November 2020, providing investors with a welcome breather after a painful year for the market.

Also Read| US Stock Market: DJIA, S&P500 and Nasdaq turns green in early trade on Friday

The S&P 500 index, which serves as a benchmark for many stock funds, gained 1.4% in July and finished 9.1% higher for the month. The index’s wide gains this month were fueled by a rebound in technology stocks, big retailers, and other industries that rely on direct consumer spending. For the year, the index is still down 13.3%.

Also Read| US Premarket: Amazon, Intel, Apple and other stocks making biggest moves

The Nasdaq jumped 1.9%, completing the month 12.4% higher, while the Dow Jones Industrial Average increased 1%, ending the month 6.7% higher.

The latest rally came as investors weighed a mix of company earnings reports and new data showing inflation jumped by the most in four decades last month.

Also Read| To fight inflation, Asian economies must raise rates rapidly: IMF

Stock gains in recent weeks have been fueled by better-than-expected corporate earnings reports and falling bond yields, which have pulled back after soaring much of this year on expectations of higher interest rates.

The S&P 500 rose 57.86 points to 4,130.29. The Dow gained 315.50 points to close at 32,845.13. The Nasdaq rose 228.09 points to 12,390.69.

Also Read| Where to invest during high inflation?

Smaller company stocks also gained ground. The Russell 2000 rose 12.20 points, or 0.7%, to 1,885.23. It ended July with a 10.4% gain.

Weak economic data, including a report Thursday showing that the U.S. economy contracted last quarter and could be in a recession, have also spurred stocks higher by giving some investors confidence that the Federal Reserve will be able to dial back its aggressive pace of rate hikes sooner than expected.

Also Read| How post-pandemic markets have behaved historically

The central bank raised its key short-term interest rate by 0.75 percentage points on Wednesday, lifting it to the highest level since 2018. The Fed is raising rates in a bid to slow the U.S. economy and quell inflation.

An inflation gauge that is closely tracked by the Federal Reserve jumped 6.8% in June from a year ago, the biggest increase in four decades, leaving Americans with no relief from surging prices. On a month-to-month basis, inflation accelerated to 1% in June from May’s 0.6% monthly increase, the Commerce Department said Friday.

Also Read| How Paul Volcker tamed inflation with two recessions in 1980s

Exxon and Chevron posted record quarterly profits last quarter amid high oil and gas prices. The two companies made $46 billion last quarter and roughly four times the amount of money they made in the same period a year earlier. Chevron shares jumped 8.9% to a six-week high, while Exxon rose 4.6%.

Amazon surged 10.4% for the biggest gain in the S&P 500 after the company posted a quarterly loss, but its revenue jumped sharply in the quarter.

Also Read| The 2008 market crash: Inside the doomsday machine and a brief history

Apple rose 3.3% after its quarterly earnings came in better than Wall Street expected. The iPhone maker saw its profit for the April-June period decline by 10% while revenue edged up 2% as it grappled with manufacturing headaches and inflation pressures.

It was a mixed day in the bond market. The two-year Treasury yield, which tends to move with expectations for the Fed, rose to 2.89% from 2.87% late Thursday. The 10-year yield, which influences mortgage rates, fell to 2.65% from 2.67%.