By Caitlin Ostroff

The S&P 500 edged higher in the final trading day of the week, heading toward a fourth consecutive month of gains.

The S&P 500 added 0.2% shortly after the opening bell. The tech-heavy Nasdaq Composite gained 0.4%. The Dow Jones Industrial Average gained around 77 points, or 0.2%.

The S&P 500 and Dow are on track to clinch gains for the month of May, while the Nasdaq is headed toward a decline, snapping a six-month streak of wins.

The month has been marked by big swings in everything from stocks to bitcoin. Worries about inflation injected a jolt of volatility to markets earlier in May, though major U.S. indexes have regained their footing since as investors rapidly stepped back into markets.

The Federal Reserve's preferred measure of inflation -- the price index for personal-consumption expenditure, excluding food and energy -- rose 3.1% from a year earlier. A surge in demand after Covid-19 restrictions were lifted, coupled with supply chain strains, likely led to a rise in prices last month.

Investors and central bankers have closely monitored inflation data to see if these pressures are likely to be temporary or long-lasting. Such data will guide whether policy makers relax measures that have helped markets recover from pandemic lows.

"We don't think the Fed's going to raise rates aggressively. We think they'll remain behind the curve because they want to help the economy recover," said Paul Flood, investment manager at Newton Investment Management. "Everybody is expecting inflation in the short term."

Fresh data also showed that Americans extended a spending binge in April, as they continued catching up on activities they held off on during the pandemic, propelling the economy. Consumer spending rose 0.5% from March.

President Biden is expected to unveil a $6 trillion budget Friday that could help support stocks most linked to the economic recovery, said Carsten Brzeski, ING Groep's global head of macro research.

Overseas, the pan-continental Stoxx Europe 600 stock index, which contains a swath of companies that benefit from global economic growth, rose 0.7% to a fresh record high.

Shares of HP tumbled 1.1% in recent trading, despite the computermaker raising its profit projections for the year following better-than-expected quarterly results.

A dizzying run for meme stocks continued this week. AMC Entertainment jumped more than 26% on Friday, continuing a string of double-digit gains that sent it to the highest close in four years on Thursday. GameStop gained 1.6% and Express rose around 13%.

Ulta Beauty shares rose 5.4% after the beauty retailer swung to a profit during its latest quarter, as sales picked up with the economy rebounding..

Cryptocurrency bitcoin, which has seen a volatile month of trading, fell 5.1% from where it traded Thursday afternoon to $36,501.02.

In bond markets, the yield on the 10-year Treasury note ticked down to 1.600% from 1.609% Thursday. Yields and prices move inversely.

The Turkish lira hit a record low Friday, with one dollar buying 8.6096 lira.

In Asia, major benchmarks largely closed higher. Japan's Nikkei 225 advanced 2.1%, led by industrial companies. Mitsubishi Heavy Industries gained 5.5%.

China's Shanghai Composite Index declined 0.2%. South Korea's Kospi added 0.7%.

--Gunjan Banerji contributed to this article.

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com

(END) Dow Jones Newswires

05-28-21 1039ET