This bearish indicator just neared its precrash high

Jubilant equity investors have been piling into U.S. exchange traded funds (ETFs) in the last few months, triggering a number of cautionary signals for stocks, according to U.S.-based tracker firm TrimTabs.

An ETF is a security that tracks an index, like the S&P 500, and flows into these funds have been positive for four of the past five weeks, according to the research. A time of continued positive sentiment might be a good thing for some investors, but contrarians, who like to go against the grain, see it as a bearish signal that markets might have become too exuberant and are due to pull back.

TrimTabs also highlighted that inflows into these ETFs over the month ending Nov. 26 was $42.9 billion, near a level not seen since December 2007, shortly after the last bull market ended. This inflow figure is also five-times the year-to-date average.

Read More3 reasons to avoid ETFs: Advisor

"We are measuring plenty of exuberance among investors both in what they are doing and in how they say they feel," TrimTabs Chief Executive David Santschi said in a note released late Sunday. "Demand for U.S. equity ETFs rebounded last week, which is discouraging."

Santschi added that leveraged ETF traders, who use financial derivatives to ramp up their exposure to stock markets, have turned neutral from bearish. This is just another example of widespread positivity in markets, which is "cautionary sign," he said.

The TrimTabs research also showed that intermediate-term indicators were turning somewhat less favorable.

While Santschi stated that these indicators do not point to a correction or a bear market in U.S. stocks anytime soon, he does believe that equity prices will be flat to lower over the next couple of weeks.

Traders work the floor of the New York Stock Exchange.
Getty Images
Traders work the floor of the New York Stock Exchange.

The S&P 500, a benchmark for U.S. stocks, has clocked gains of 14 percent this year despite a selloff in mid-October that almost drove the index into correction territory. Extra liquidity from the Federal Reserve's asset-purchase program has been credited with driving a six-year bull market in stocks, and investors have had a nervy year as the Fed looked to end its stimulus efforts. The sharp decline in equities anticipated by some investors has failed to materialize, however.

Read MoreInvestors look to ETFs as fund managers disappoint

The bullish nature of traders in the current climate was underlined by last week's AAII Investor Sentiment Survey. The index measures the percentage of individual investors who are bullish, bearish and neutral on the stock market for the next six months. In the week ending Nov. 26, over 52 percent of respondents said they were bullish. This is a 3 percent gain from the previous week and is above the long-term average of 39 percent.

Successful investors like Warren Buffett in the U.S and Neil Woodford in the U.K. pride themselves on their contrarian perspective, and these cautionary signs from TrimTabs are likely to interest investors with a similar view.

However, Laith Khalaf, a senior analyst at Hargreaves Lansdown, said contrarian investing wasn't straightforward.

Read MoreInvestors flocking into index funds—here's why

"Being contrarian isn't about just doing the opposite of the rest of the market, particularly based on observations made over the course of a few weeks," he told CNBC via email. "This needs to be combined with an inspection of the fundamental investment case for the asset you are buying into."

Khalaf agreed that U.S. stocks do look expensive given their 14 percent gain, but added that there may be fundamental reasons for this.

"Even if you believe the U.S. is overvalued, momentum can last for a long time, and you may have to be patient if you position your portfolio accordingly," he said. "December is historically a good month for stocks. Indeed the inflows observed may well be a second-order effect, as investors seek to get into the market ahead of this seasonal tailwind."