By Joe Wallace and Michael Wursthorn

U.S. stocks hovered near record levels as investors sold shares of technology and communications stocks and Treasury yields climbed.

The S&P 500 bounced around the flatline most of the trading session a day after setting its 24th closing record of the year. As of 4 p.m. ET, it was down less than 0.1%. Tesla shares were among the broad index's biggest decliners after the electric car maker's latest quarterly report underwhelmed investors.

Shares of other big tech companies that are due to report earnings, including Microsoft, Google parent Alphabet and Spotify Technology, were mixed.

Tuesday's trading session is the latest in a volatile stretch that has seen the broader stock market grind higher rather than continue its rocket-like climb of last year. Better-than-expected earnings across the board have helped the market hit a series of records in recent sessions, but the benefits appear to be on the margins as investors seem picky in which share prices they push higher.

About 30% of the companies in the S&P 500 have reported results so far, with nearly 88% topping analysts' expectations. But just 58% of reporting companies have seen their stock prices rise in the wake of disclosing quarterly results, according to FactSet. Investors appear cautious, money managers said, pointing to risks stemming from elevated valuations, the potential for a jump in inflation and the raging epidemic in India.

"We've got a big week of tech earnings where valuations are probably a bit more stretched than in other areas," said Stuart Rumble, investment director at Fidelity International.

After hitting its first record in about two months Monday, the Nasdaq Composite retreated 0.3%. The Dow Jones Industrial Average also struggled to gain momentum, finishing the day flat as falling shares of 3M weighed on the blue-chip index even after reporting better-than-expected earnings.

At the same time, the yield on 10-year Treasury notes rose to 1.618%, from 1.568% Monday, pushing prices lower. Yields are on course to advance for a third consecutive session.

The other thing on investors' minds was Federal Reserve Chairman Jerome Powell's next press conference on Wednesday once the central bank wraps up its latest policy meeting. Investors will be looking for clues around whether the Fed's thinking on interest rates has changed in light of recent economic data, some of which suggests inflation is reappearing.

So far, the Fed has repeatedly signaled that it has no immediate plans to tighten fiscal policy until the economy and the labor market fully recovers from the Covid-19 pandemic.

In company news, shares of Tesla, which reported a record profit, fell 4.3%. The electric car maker's stock has struggled this year, rising just 0.2% since the end of December, amid a series of challenges including an investigation into a crash of a Model S sedan earlier this month in Texas. The stock remains up more than 300% over the past 12 months.

General Electric slipped about 2.1% after the company's jet-engine business and divestitures weighed on its quarterly results. Profits shrank at Eli Lilly, pushing shares down 3%. And 3M shares fell 4.9% even after the manufacturer said sales grew across all of its segments.

Delivery companies topped the S&P 500's best performers, with United Parcel Service shares jumping 11% after the shipping company topped forecasts for profit and revenue. FedEx, which reported earnings last month, rose 4.8%

Other movers included Lyft, which said Monday it was selling its self-driving division to a unit of Toyota Motor, sending the stock down 0.5% after reversing an earlier gain.

Some investors say stocks face a bumpy ride in the coming months, pointing to signs of excess in cryptocurrencies and other corners of financial markets.

"It may make sense to take a couple of chips off the table," said Daniel Egger, chief investment officer at St. Gotthard Fund Management. Surveys showing that individual investors are extremely bullish suggest stocks are vulnerable to a pullback, according to Mr. Egger.

In overseas markets, losses for financial-service, auto and basic-resource stocks weighed on the Stoxx Europe 600, which ticked down 0.1%.

Among individual European companies, shares of UBS Group fell 2%. The Swiss lender said it lost $774 million from the implosion last month of Archegos Capital Management, a bigger hit than analysts expected.

In Asian markets, Japan's Nikkei 225 ended the session down 0.5%, and China's Shanghai Composite Index closed up less than 0.1%.

Write to Joe Wallace at Joe.Wallace@wsj.com and Michael Wursthorn at Michael.Wursthorn@wsj.com

(END) Dow Jones Newswires

04-27-21 1619ET