(AP) -- Stocks ended mostly higher Friday, helping the S&P 500 index close out its best week since February. It's a notable turnaround for the market, which only the previous week had its worst week since February on concerns about inflation.
The S&P 500 index closed up 14.21 points, or 0.3%, to 4,280.70. The Dow Jones Industrial Average rose 237.02 points, or 0.7%, to 34,433.84 and the Nasdaq Composite lost 9.32 points, or 0.1%, to 14,360.39. With Friday's gains, the S&P 500 index ended the week up 2.7%, its best week since February.
The Dow's gains were driven by a surge in Nike, which reported blowout earnings late Thursday and gave investors a strong outlook for the year. Nike rose 15.5%.
Markets have calmed since the Federal Reserve surprised investors last week by saying it could start raising short-term interest rates by late 2023, earlier than expected, if recent high inflation persists. The calming of investors' nerves has largely helped the market undo the damage from the previous week.
Investors got another data point on inflation on Friday. The Commerce Department said inflation tied to a gauge of consumer spending that is closely watched by the Federal Reserve increased 0.4% in May and is up 3.9% over the past 12 months, well above the Fed's 2% target for annual price increases.
"Today's inflation data should calm some nerves about runaway inflation. Remember, the PCE is the Fed's favorite measure of inflation, and it very well could be near a peak in inflation," Ryan Detrick, chief market strategist for LPL Financial, wrote in an email to investors.
Investors are also embracing a bipartisan deal for infrastructure spending. President Biden and a group of Democrat and GOP senators were able to reach a near $1 trillion deal to build out numerous parts of the country's infrastructure, including roads, rails and ports. The plan, costing $973 billion over five years, is the culmination of months of talks, and a larger spending plan from President Biden is still possible later this year.
FedEx fell 3.6% after the company announced it would increase its spending to reduce delivery delays across its network.
Virgin Galactic jumped 38.9% after the company got approval from the Federal Aviation Administration to start its flights into space, the final approval the company to begin commercial spaceflight.