A logo for the New York Stock Exchange is displayed above the trading floor on Wednesday, Dec. 27, 2017.  (Mark Lennihan/AP)

Wages were mostly flat again last year, even as the stock market rose to record heights. This is kind of what we expect nowadays: The divide between Main Street and Wall Street has become a staple of stump speeches everywhere.

But it didn't always used to be this way. In fact, for a long time market performance tracked fairly closely with wage increases. But that all changed around 1980, when stocks took off and compensation languished.

What happened? To answer this, we'll need to start with the chart below. I've plotted the relationship between stock market performance and workers' compensation over the past 60 years, since 1948. It's a timeline, starting at 1948 in the lower left corner and ending in 2016 in the upper right, that snakes around depending on the change in pay and in the S&P 500 each year.

You can divide this timeline into two major periods. From 1948 to about 1980, stock gains were relatively modest while pay rose significantly. Over that period, average hourly compensation (including wages and benefits) in real terms rose close to 90 percent, from $12.37 an hour in 1948 to $23.32 an hour in 1980. In inflation-adjusted terms, the S&P 500 rose by about 145 percent during that time — more than wages but still at about the same order of magnitude.

Now, look at the period from 1980 to 2016. You can see that the line flattens out as wages stagnate while the stock market booms. Over that period, average real compensation rose 14 percent, to $26.61 an hour. The S&P, on the other hand, grew by 502 percent.

What we see, in sum, is that earnings and stock performance were closely correlated until about 1980. But around that time stocks began to peel away. Whatever coupling once existed between the market and wages appears to be gone or at least severely weakened.

“Stock market gains and near-stagnant pay for most workers have the same root cause: the policy-induced shift of economic leverage and bargaining power away from typical workers and towards corporate managers and owners of capital,” says Josh Bivens of the Economic Policy Institute, a progressive think tank.

There's a laundry list of reasons for this, and if you've been following the recent national debate over inequality, they're probably familiar to you: low minimum wages, the decline of unions, globalization, shifts in tax policy.

Some conservative economists object to the EPI's compensation calculations for charts like this one because they exclude supervisors and managers, or roughly the top 20 percent of the workforce. That group has done well in recent years, and if you include it in the calculations, overall wage growth looks healthier.

The EPI counters that that's precisely the point — the top 20 percent have been leaving everyone else in the dust, and if you don't parse out the difference between the top and everyone else, you miss that story completely.

For our own purposes here, we can say that including supervisors and managers in compensation numbers doesn't change things much. From 1948 to 1980, total pay including that group nearly kept pace with gains in the S&P 500. But from 1980 onward, the S&P has outpaced compensation among all workers by a factor of roughly 10.

In short, a country that has made the economic decisions that we have over the past 40 years is all but guaranteed to see its stock market take off while its wages stagnate. If you own a big chunk of the stock market, you're likely to cheer this change, but if you live paycheck to paycheck and aren't able to sock any money away for the long haul, this shift spells trouble.

Regardless, it has grown increasingly clear that stock performance is no longer the barometer of shared prosperity it once was.

Note on the data:

Inflation-adjusted S&P 500 numbers were compiled by Yale's Robert Schiller.

Wage data comes from the Economic Policy Institute's measure of the average hourly compensation of production and nonsupervisory workers. This number accounts for roughly 80 percent of the workforce and includes benefits like health care and vacation time, as well as pay.