Wall Street capped a day of mostly wobbly trading with meager gains Tuesday, enough to nudge the S&P 500 to an all-time high for the third straight day.
The benchmark index spent much of the day hovering below its previous high, but edged up in the final few minutes of trading.
Household goods makers, health care stocks, utilities and other sectors helped lift the market, narrowly offsetting a steep decline in communications companies.
Google's parent company, Alphabet, led the slide after the search giant reported a slowdown in revenue growth. Retailers and hospitality industry companies also fell.
The market's latest gyrations came as investors weighed the latest batch of corporate earnings reports.
"This is a market that's trying to find its way after advancing nearly 18 percent through last night on a year-to-date basis," said Lindsey Bell, investment strategist at CFRA. "While the numbers have been good, there still remains a cautious tone in the market."
The U.S. stock market has been riding high this year after mounting a big comeback from a steep slump at the end of 2018. Investors have been feeling more optimistic this year as fears of a global economic recession eased and negotiations between the U.S. and China over their costly trade war appear to be making progress.
The Federal Reserve has done the most to allay the market's jitters this year by signaling that it may not raise interest rates at all in 2019 after seven increases the previous two years.
Traders will get to hear from the Fed again on Wednesday, when the central bank's policymakers issue another update on interest rate policy and their view on the U.S. economy.
The S&P 500 rose 0.1 percent to 2,945.83, a record. The Dow Jones Industrial Average added 38.52, or 0.1 percent, to 26,592.91. The Nasdaq, which is heavily weighted with technology companies, fell 0.8 percent to 8,095.39.