The S&P 500 rose Friday as Wall Street looked to finish the week and the month higher.

The broad market index climbed 0.2%, while the Nasdaq Composite added 0.3%.The Dow Jones Industrial Average fell 20 points, or 0.08%.

Wall Street was set to post strong weekly gains. The Dow is now up 1.9% for the week, while the S&P 500 and the Nasdaq Composite are up 2.9% each.

The major averages were also on pace for their best month of the year. The Dow is on track for a more than 5% gain for July, which would be its highest since March 2021. The S&P 500 is up by 7.8% for the month and the Nasdaq Composite, while still in bear market territory, is up more than 10%. Both are looking at their biggest monthly gains since November 2020.

That performance is a stark contrast from the previous six months when stocks tumbled to their June bear market levels. The market reversed as investors’ fears about the aggressive pacing of the Federal Reserve’s interest rate increases started to wane and the idea that inflation has perhaps peaked began to settle in.

Still, some have remained worried about inflation levels with Russia’s ongoing war on Ukraine and the possibility that markets could turn lower again. On Friday the Bureau of Economic Analysis reported that the personal consumption expenditures price index, an inflation indicator closely watched by the Fed, hit its highest level since January 1982.

Nevertheless, stocks Friday were higher, supported by gains from two of the market’s biggest stocks. Amazon shares popped 10% after the e-commerce giant reported stronger-than-expected sales for the previous quarter, while Apple climbed about 2% after posting better-than-expected iPhone revenue.

Chevron and Exxon Mobil also posted better-than-expected results for the previous quarter, sending their shares higher by about 5% and 2%, respectively.

However, the latest batch of corporate results has been mixed.

Shares of Roku sank more than 26% after the company missed estimates and warned of a slowdown in advertising. Chipmaker Intel dropped 11% after its quarterly results fell short of expectations.

These moves come after a three-quarters of a percentage point hike from the Federal Reserve on Wednesday and a negative GDP reading on Thursday.

“The market is taking on a hope that slowing economic growth is going to result in a more dovish Fed moving forward, even if it’s a little further out. So it would make sense to me that weaker rates expectations moving forward would result in a little buoyancy in the equity markets,” said Lauren Goodwin, economist and portfolio strategist of New York Life Investments.

However, Goodwin cautioned that the unusual economic environment and the long period before the next Fed meeting make it difficult to predict the central bank’s path from here.