However, Rosenberg notes that while momentum stocks are lifting the market, "many subsectors are well off their highs: Homebuilders. Autos. Banks. Insurance. Consumer products. Telecom. Media. Transports. Utilities. Pharma. And many more.”

The is up more than 5 percent in 2018, recovering from a correction earlier in the year. The broad index was also just 1.9 percent removed from an all-time high reached in late January as of Tuesday's close.

Don’t be fooled. This market is weaker than it seems, according to David Rosenberg, chief economist and strategist at Gluskin Sheff.

The S&P automobiles and components industry group is nearly 20 percent below its 52-week high, while insurance stocks are down 10.8 percent from their one-year high. The Dow transports index, meanwhile, is 6.5 percent below its one-year high.

“What has kept the market near record terrain are a mere six stocks — Alphabet, Apple, Amazon, Netflix, Microsoft and Facebook,” Rosenberg said in a note to clients Wednesday. “Strip out these six flashy stocks, and the overall market has done practically nothing year-to-date.”

Through mid-July, Alphabet, Apple, Amazon, Netflix, Microsoft and Facebook had contributed nearly 80 percent to the S&P 500’s gains. These six names have been on fire this year. Netflix and Amazon are up 86 percent and 57 percent in 2018, respectively. Microsoft and Facebook have both risen more than 20 percent while Alphabet and Apple have jumped 19.8 percent and 14 percent, respectively.

Rosenberg said such concentration in the stock market has not been seen since the late 1990s, just before the dot-com bubble burst. “We know from history how these cycles typically end.”