U.S. stock indexes broke records Tuesday. The Dow Jones Industrial Average closed above 19,000, the S&P 500 closed over 2,200, and the NASDAQ closed over 5,300 — all first-time highs.

This wasn't supposed to happen. In the run-up to the presidential election, everyone was predicting that a victory for Donald Trump would send the stock market into a tailspin. The man is an erratic demagogue who showed no concern for deficits, zero policy knowledge, and was ready to rip up international trade agreements. Surely he'd create a market panic. Yet after some brief jitters following Trump's win, the stock market has kept marching skyward.

This has caused no shortage of head scratching.

The first explanation is that maybe President Trump will be good for the economy after all. This story focuses on the likelihood that Trump and the GOP will cut taxes, spend big on infrastructure, run up the deficit, and cut environmental regulations, all of which will boost growth. This is surface-level plausible, until you look under the hood.

Trump's proposed tax cut is overwhelmingly titled towards the wealthy. That wastes its stimulative impact, since rich people already have all the spending money they need. Even more important — and what everyone ignores — is that Trump's election means Republicans will probably enact House Speaker Paul Ryan's budget, gutting government aid programs and public investment. That would yank money out of the pockets of the people most likely to go out and spend it.

Next, Trump's infrastructure plan will probably use tax credits aimed at private construction firms to coax them into new infrastructure projects. But since they're pursuing profits from consumers, private construction companies will most likely build where help is needed the least — mostly on projects they'd have built anyway. In fact, companies will probably just pocket the difference from the tax cut. That's why analysis shows that boosting corporate cash flows is one of the least stimulative policies out there, while government paying contractors directly for infrastructure work is one of the most stimulative.

And what about deregulating industries like energy? It may lower companies' costs of doing business, but again, if no new customers come along, companies won't create new jobs to tap demand that isn't there. As with the infrastructure plan, companies will just pocket the extra cash as profit.

So are the people who are willing to pay more than ever to buy stocks across the economy just dumb? Well, maybe. But there's also a grimmer aspect at work.

Practically speaking, when you purchase a stock you're buying access to a stream of dividend payments taken out of a company's profits. So if profits for companies across the economy are rising or are expected to rise, then presumably the markets should rise too, as everyone's willing to pay more for stocks. That's how reporters and pundits justify the assumption that a strong stock market signals a strong economy.

Except there are plenty of scenarios where profits can go up without any accompanying growth in jobs or wages. In those cases, the economy isn't growing; companies are just extracting more of the wealth their workers create and distributing it to stock owners where it circulates endlessly.

In fact, that's what already happened over the last few decades: Inequality soared, GDP growth slowed, middle- and working-class wages stagnated, investment by companies in real economic activity collapsed, and productivity growth was reduced to a crawl. Yet corporate profits reached record highs, and the stock market just kept climbing.

There's every reason to think Trump's policies will just exacerbate this trend. Like I said, infrastructure tax credits and deregulation will likely pour money into corporations without creating much in the way of new jobs — companies will just pocket the difference as profits. Trump's tax plan includes a big cut to the corporate income tax, and Republicans have been itching to cut the capital gains tax, too. Both of those policies will juice corporate profits and make buying stocks way more appealing, again without doing much of anything for jobs.

Ultimately, the stock market doesn't measure the economy, or the livelihoods of most working Americans. Rather, it measures how good the rich Americans who own most stocks feel about the future of their own pocketbooks.

So the scary possibility isn't that the stock market has lost its mind. It's that it knows exactly what President Trump will do.