By James Mackintosh

Look only at Tesla and it is clear that the stock market in the midst of a wild speculative frenzy. As Deutsche Bank strategists put it, the electric-car maker has added the equivalent of eight Ford Motors or 27 Renaults in market value since March as it benefited from the surge in retail investing -- or, depending how you think of it, the shift of gamblers from sports betting into stocks.

Investor sentiment can be a great contrarian indicator: When everyone is panicking, as in March, buy; when everyone is irrationally exuberant, sell. And rarely has anything been as exuberant as Tesla stock.

The trouble is that the rest of the market isn't behaving like Tesla. The market is split: Retail traders are excited, while professional investors and longtime private investors are still fairly cautious.

Sentiment measures are split, too. Surveys of how investors feel show no excessive bullishness, while measures of what investors are actually doing suggest they have thrown caution to the wind.

One of my favorite measures is the put/call ratio, which shows how much investors are using put options to protect against market falls compared with bullish call options. Rarely has it shown so much optimism, with the 10-day moving average showing the least use of puts relative to calls since September 2000, when the post-dot-com-bubble selloff began in earnest.

Trading volumes on the technology-heavy Nasdaq compared with the New York Stock Exchange tell a similar story. They are rising in a way reminiscent of the dot-com bubble. The narrow breadth of the market -- so much of the gains coming from a handful of big stocks -- often indicates a top, too.

Ask longstanding investors what they think and it is hard to find signs of excitement. The American Association of Individual Investors finds bears still outnumber bulls in its self-selecting survey. The Investors Intelligence gauge of stock-market newsletters is a bit more optimistic, but not exuberant.

That contrasts with individual investors, who have flocked to low-cost trading systems such as Robinhood since lockdowns began. The regular New York Federal Reserve survey of consumers found in April the highest proportion since it began seven years ago expecting higher stock prices. It has come down a bit since then but is still higher than anytime before the pandemic.

"People are reluctantly getting bulled up in their portfolios," says Tobias Levkovich, chief U.S. equity strategist at Citigroup. His Panic/Euphoria sentiment indicator has shifted into euphoric territory, indicating an 80% chance of losing money in stocks over the next 12 months.

But the divergence among the different ways to measure sentiment means other ways of putting them together lead to the opposite conclusion. The Bull & Bear indicator from BofA Securities is still showing bears dominate, although it is no longer showing the extreme bearishness that sends a contrarian buy signal.

Sentiment measures "work better when they're all moving together," says Sushil Wadhwani, a former Bank of England policy maker who runs hedge fund QMA Wadhwani. "To be bearish now I don't think one should point to the sentiment indicators."

For me, the story is one of individual investors being exuberant about stocks such as Tesla, while more experienced investors are -- perhaps unwisely -- piling into cash-rich tech growth businesses able to expand whatever the economy does. That doesn't suggest the sort of overexcitement that a contrarian usually worries about.

Yet, just because there isn't a sentiment-driven bubble, that doesn't mean investors aren't at risk of overpaying for stocks.

Supposedly safer stocks, mostly tech names that are resistant to the ravages of the coronavirus lockdowns, are now far more expensive than they were in January. Even if earnings turn out to be just as good as investors are pricing, secular growth stocks such as Alphabet or Microsoft also need to be the only safe bet in town.

What could hurt them is if the economy truly gets back on its feet. Supercheap car makers, restaurants or airlines will suddenly look like screaming bargains, making the tech giants look very expensive. The Fed hinting that it might remove monetary support also would remove a vital prop holding up their valuations.

That might sound like the kind of internal stock-market rotation that doesn't cause too much damage. But growth stocks are now such a large part of the overall market that it will be hard for riskier stocks to compensate. Mr. Levkovich points out that technology, internet retail ( Amazon.com) and media and entertainment (where Facebook, Netflix and Alphabet sit) make up 41% of S&P 500 market value, reminiscent of the explosion in value of the tech, media and telecommunications sector in the late 1990s.

The difference to the dot-com bubble is that this time the highly valued stocks are mostly reliably profitable companies (again, Tesla aside). It isn't obvious that traders are buying Amazon or Microsoft in the expectation of selling them on to a greater fool at a still-higher valuation in the future, the way they did the dot-coms.

My best trades in the past have been deeply contrarian, but for all the bullishness visible in the market, there just isn't enough overconfidence around. It feels like the fundamentals of the pandemic, rather than sentiment, pose the bigger risk right now.

Write to James Mackintosh at James.Mackintosh@wsj.com