(AP) -- 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 last 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% 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 S&P 500 rose 2.80 points, or 0.1%, to 2,945.83, a record. The Dow Jones Industrial Average added 38.52, or 0.1%, to 26,592.91.
The Nasdaq, which is heavily weighted with technology companies, fell 66.47 points, or 0.8%, to 8,095.39. The Russell 2000 index of smaller company stocks dropped 7.15 points, or 0.4%, to 1,591.21.
Major indexes in Europe finished mostly higher.
Bond prices rose. The yield on the 10 year Treasury fell to 2.50% from 2.53% late Monday.
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.
Earnings reporting season is more than a third of the way in, and investors continue to search for clues about whether profit growth can accelerate later this year following a weak first quarter.
So far, about 269 of the companies in the S&P 500 have reported their earnings for the first three months of the year. Among them, earnings are down about 0.3% from a year earlier. Analysts forecast a drop of 1% in earnings growth for S&P 500 companies this reporting season. That's not as bad as the 4% decline they were expecting a few weeks ago.
"Sales numbers have been better than expected, too, which I think is the bigger story here, because that was the No. 1 thing people were worried about," Bell said.
The strong rally in stocks at a time when company earnings growth is still sluggish may be giving investors reason to pause.
Bell noted that valuations, or the price-earnings ratio of stocks, are becoming "a little bit stretched" at nearly 18 times expected earnings.
"You've seen corporate management teams still remain a little bit cautious in tone, with regard to guidance," she said.
The latest batch of corporate earnings Tuesday gave traders a mixed snapshot of how companies are doing.
Industrial conglomerate General Electric climbed 4.5% in heavy trading after beating Wall Street's profit and revenue forecasts for the second straight quarter. The company has been shedding units and reorganizing as it tries to increase growth.
Health care stocks bounced back after wobbling in early trading as several of the sector's big names reported their results.
Merck rose 2.5% after reporting that its profit quadrupled in the first quarter, easily beating Wall Street's forecasts. Pfizer, another huge drugmaker, gained 2.6% after higher sales of prescription drugs helped it report a 9% jump in profits, also easily beating forecasts.
Eli Lilly slid 2.1% after the drugmaker cut its revenue forecast for the year as it faces price declines and more competition for its drugs.
Other big names on Wall Street posted results that put traders in a selling mood.
Alphabet slumped 7.5% in heavy trading after disappointing advertising sales held back revenue growth during the first quarter.
The search engine's revenue fell short of analysts' forecasts because advertising revenue only grew by 15%. The company is in tight competition for digital ads with Facebook and Amazon.
General Motors slid 2.6% after reporting a surprise drop in sales during the first quarter. The automaker raised prices on its vehicles, especially trucks, during the quarter.
Restaurant operator Texas Roadhouse slumped 11.6% after profit fell because of higher labor costs. Both profit and revenue fell short of forecasts.
Energy futures finished mostly higher. Benchmark U.S. crude rose 0.6% to settle at $63.91 per barrel. Brent crude added 1.1% to close at $72.80 per barrel.
Wholesale gasoline gained 1.9% to $2.12 per gallon. Heating oil climbed 1.3% to $2.08 per gallon. Natural gas fell 0.7% to $2.58 per 1,000 cubic feet.
Gold added 0.3% to $1,285.70 per ounce, silver inched 0.3% higher to $14.98 per ounce and copper rose 0.2% to $2.90 per pound.
The dollar fell to 111.37 Japanese yen from 111.71 yen late Monday. The euro strengthened to $1.1221 from $1.1183.