US stocks lost steam on Friday as a recent rally took a pause amid signs of a resilient economy that boosted hopes the Federal Reserve could end its rate-hike campaign soon.

The S&P 500 (^GSPC) and Dow Jones Industrial Average (^DJI) finished down about 0.3% on Friday, while the technology-heavy Nasdaq Composite (^IXIC) was down 0.7%. The S&P 500 and Nasdaq still finished the week with their best gains since March.

In economic data, the University of Michigan Consumer Sentiment Index showed consumers are slightly more confident about the state of the economy, which could help tilt a “hawkish” Fed closer to a July rate hike.

The June preliminary number came in at 63.9, compared to expectations of 60.5, according to estimates from Bloomberg. The index had dipped to 59.2 last month in its first fall since February.

Global stocks got a lift from growing expectations that China will have to bump up stimulus as its recovery stutters.

This content is not available due to your privacy preferences.

Update your settings here to see it.

Click here for the latest stock market news and in-depth analysis, including events that move stocks

Read the latest financial and business news from Yahoo Finance