U.S. stocks inched higher on Friday, with investors hesitant to make major moves ahead of a speech by Federal Reserve Chairwoman Janet Yellen and a long holiday weekend.
The benchmark S&P 500 index is on track to end the week with the biggest gains in nearly two months.
U.S. markets will be closed on Monday for the Memorial Day holiday.
The S&P 500 was up 4 points, or 0.2%, to 2,093 with eight of its ten main sectors trading higher. Energy and materials were weighed down by falling oil prices.
The Dow Jones Industrial Average gained 26 points, or 0.2%, to 17,852. Meanwhile, the Nasdaq Composite advanced 9 points, or 0.2%, at 4,911.
"Given that we have two major risk events for the markets in the coming weeks--EU referendum in the U.K. and possible rate hike from the Fed--I do wonder though whether this [recent] rally has the legs to build significantly on the moves of the last couple of days," said Craig Erlam, senior market analyst at Oanda, in a note.
U.S. stocks closed little changed on Thursday after two days of strong gains, which came on the back of upbeat economic data and oil prices moving above $50 a barrel. However, the rally started to fizzle later Thursday as crude failed to hold above $50.
Both West Texas Intermediate crude oil and Brent continued to fall on Friday.
Waiting for Yellen: The Fed chief pays a high-profile visit to Harvard University on Friday, where she's scheduled to deliver a speech at 1:15 p.m. Eastern Time. Investors are eager to hear any views on the interest rate outlook, after a week of hawkish comments from prominent Fed members.
Earlier this month, minutes from the U.S. central bank's April meeting took markets by surprise by indicating a rate increase in June is still on the table.
The ICE dollar index was up 0.2% to 95.335 ahead of Yellen's appearance.
After the hawkish minutes, expectations for a rate hike this summer increased. Fed funds futures, which two weeks ago were pricing in only a 4% probability of a June rate hike, were signaling a 26% chance on Friday, according to the CME Fed Watch tool. The probability of a July rate hike is at 55%.
Economic news: U.S. first-quarter economic growth was revised up to 0.8% from a previous reading of 0.5%, based on a fresh estimate that shows somewhat stronger home construction and restocking of warehouse shelves.
Market reaction to a slight upward revision in first-quarter U.S. economic growth was muted.
At 10 a.m. Eastern, a reading on consumer sentiment for May is due, forecast to come in at 95.
At the Group of Seven meeting in Japan, political leaders warned of rising risks to the global economy, but stopped short of announcing any coordinated plan to tackle the concerns.
Movers & shakers: Shares of Ulta Salon Cosmetics & Fragrance Inc. jumped 9%. Earnings from the makeup retailer released late Thursday topped Wall Street estimates.
Valeant Pharmaceuticals International Inc. rose 4 after a report saying it had received and rejected a takeover from Japan's Takeda Pharmaceutical Co.(4502.TO) and private-equity firm TPG.
Big Lots Inc. rallied 11% after the discount retailer boosted its outlook for the year and reported a 20% rise in profit.
Alphabet Inc. inched 0.6% higher after the Google-parent on Thursday won a jury verdict in a long-running case against Oracle Corp.
GameStop Corp. slumped 5.7% after the videogame retailer late Thursday reported an 11% drop in earnings.
Other markets: European markets were slightly mixed, taking a breather after a three-day rally.
Markets closed mostly higher in Asia, but traders there were cautious ahead Yellen's comments later on Friday.
Gold prices inched lower.