While the major indexes are trading at or near record highs, the number of stocks listed at the New York Stock Exchange at 52-week lows was around three times higher last week than those at 52-week highs, according to data from SentimenTrader. This is the first time since Dec. 28, 1999, that such a disparity took place and the second since 1965, the data show.

Investors look at the number of 52-week highs and lows made by stocks as a sign of market participation. In other words, more stocks making 52-week highs signals broad participation in an uptrend. Meanwhile, fewer 52-week highs during an uptrend suggest limited participation.

Average stock fell in September

The overall S&P 500 gained 0.4 percent in September, but the average stock in the index actually fell 0.06 percent last month, according to data from Bespoke Investment Group. The main index is market-cap weighted, so bigger stocks have a bigger influence on the index.

"This is a result of the largest stocks in the S&P performing better than the smaller stocks in the index in September," Bespoke said in a note.

Microsoft and Exxon Mobil, two of the largest stocks in the S&P 500, rose last month by 1.8 percent and 6.1 percent, respectively. Meanwhile, Stericycle — which is the smallest stock in the index — fell 4.9 percent last month.

At the same time, the 10-day average of stocks making new 52-week highs at the New York Stock Exchange is below 100, said Andrew Thrasher, portfolio manager at The Financial Enhancement Group and founder of Thrasher Analytics. The technical analyst noted this has happened just three other times: at the lows of the financial crisis in 2009, in 2013 and in 2014.

The recent rally in stocks has also been limited to the large-cap indexes, leaving small-cap stocks behind. The Russell 2000, which is made up of small-cap stocks, has not hit a record since Aug. 31. Since then, the index has fallen about 4 percent, while the Dow and S&P 500 are up 3.7 percent and 1.2 percent, respectively.

Small caps initially left their large-cap counterparts in the dust earlier this year, as investors poured money into companies with lower overseas exposure amid growing fears of a global trade war. These fears have dissipated recently, however, as the U.S. agreed to trade deals with Mexico and Canada.

But strong earnings and economy

"When trade war fears soften, Chinese stocks outperform, [and] U.S. small-cap stocks underperform large caps," said Nick Raich, CEO of The Earnings Scout. "This is the trader's playbook that is dictating market action."

"With President Trump waving a victory flag over a new trade deal with Canada and Mexico, the markets are perceiving he will soon be waving the same flag with China soon," Raich said.

To be sure, this rally has two things going for it: strong corporate earnings and solid economic data.

Corporate earnings grew by 25 percent in each of the first two quarters, according to data from FactSet. Meanwhile, the U.S. economy grew by 4.2 percent in the second quarter and by 2 percent in the first quarter.

Thrasher of The Financial Enhancement Group says the market will need this to continue. "Can major averages continue to trend higher without broad participation? Yes, but it requires a near-perfect environment for it to occur like we saw with record-breaking earnings in Q2. Will Q3 reports be just as good and keep traders focused on just a handful of stocks to buoy the market? We'll see."