If it’s all about the economy, stupid, then stock-market bulls may want to think twice about betting on further gains.

Many chart watchers say the financial markets are always right. They believe markets move before trends in fundamental data change, because market prices reflect all the information that can be known to investors, in real time, while economic and earnings data are released with a lag.

With the S&P 500 SPX, -1.11% reaching an all-time intraday high for a second straight trading session on Tuesday, that would suggest the economy’s recent struggles, as depicted by disappointing fourth-quarter growth in gross domestic product, a sharp decline in retail sales and continued weak inflation readings, will eventually give way to improving growth. Read more about recent economic data.

But as the above chart, joined by the following charts, shows, investors often ignore disappointing economic information as a bull market progresses, just as they did before the previous two recessions. And when market prices just start building rapidly on themselves, without a strong economic platform or continued stimulus from the Federal Reserve, the market bubble that is created should eventually pop.

As the saying goes, there’s nothing as bullish as a fresh record, except the last one.

S&P 500 (black) compared with year-over-year change in retail sales (blue) FactSet

Retail sales declined for a second straight month in January. Although sharp declines in gasoline prices had something to do with that, the data showed that consumers aren’t spending the money they saved on gas. Keep in mind that retail sales have been trending lower for more than three years, while oil prices peaked about eight months ago.

The above chart shows the S&P 500 can continue to climb while retail sales trend lower for a while, but eventually investors wake up.

Goldman Sachs Commidities Index (green) vs. S&P 500 (black) FactSet

Many believe that lower oil prices are good for the economy, because they put more cash into consumers’ pockets. But what of the overall commodities complex?

Many commodities, such as copper and other industrial metals, are used in manufacturing and construction industries. Therefore, an overall decline in commodities prices can be viewed as a warning of lower demand, and therefore of a slowing global economy.

Investors aren’t heeding that warning — yet.

Average hourly earnings of production workers (orange) vs. S&P 500 (black) FactSet

Consumer spending makes up more than two-thirds of the economy. So the more money consumers make, the better it is for the economy, and therefore the stock market.

That means the opposite should also be true.

Adjusted after-tax corporate profits (blue) versus the S&P 500 (black) FactSet

Some stock-market strategists will say corporate earnings growth is the most important data point for investors to watch, because how a company’s business performs, whatever the macroeconomic environment, is how its stock should also perform.

The above chart shows that the last time the stock market and corporate profits diverged, as they are now doing, was just before the previous recession and bear market.

Chain-type PCE price index, ex food and energy (blue) versus S&P 500 index (red) FactSet

The change in the price of goods — the inflation rate — can be a good indicator of economic strength, since rising prices reflect rising demand. Meanwhile, one of the biggest concerns among central bankers is falling prices — deflation — because if consumers expect goods to get cheaper, why should they spend now?

The Federal Reserve said last month that inflation is expected to decline further in the near term, but then turn higher, as it believes the effect of lower energy prices should dissipate. But the above chart tracks inflation, measured by personal-consumption expenditures, excluding volatile food and energy prices.

So what happens if inflation doesn’t turn higher?

Total construction put in place (blue) versus the S&P 500 (black) FactSet

The above chart shows that construction spending can greatly exaggerate economic strength and weakness, but the trend in spending will follow the economic cycle. The last time the stock market continued to strengthen when construction spending declined was just before the start of the last recession.

Does that mean the last record high is right around the corner?