In less than six months, more than a billion dollars of expected tax money evaporated in Maryland, upending rosy talks of tax cuts and launching partisan spending fights.

Where did the money go?

The stock market gains of a tiny number of ultra-wealthy people did not generate as much tax money as state budget forecasters predicted.

When forecasters are this wrong about the financial fortunes of the state's top taxpayers, Maryland's governor and General Assembly have to cut the budget by tens of millions of dollars.

Stagnant wages and the lackluster economy also depressed how much the state can spend, but the most elusive variable — the piece that most often turns surpluses into deficits — is trying to accurately predict how the top 0.1 percent of Maryland taxpayers manage their wealth, particularly their income from capital gains.

Among that elite group, an even smaller portion — 258 of the state's 2.7 million taxpayers — contributes 41 percent of all capital gains taxes in Maryland.

“Capital gains is the bane of my existence,” said Andrew Schaufele, director of the Bureau of Revenue Estimates. “And I do have some numbers to back that up.”

Instead of figuring out how to spend a $450 million surplus, Gov. Larry Hogan and lawmakers will spend much of the rest of the 90-day legislative session deciding how to close a $544 million budget gap.

“The higher-end earners are not paying as much in taxes because they're not making as much money in the stock market,” Hogan said of the capital gains shortfall. “That's basically what happened.”

For the past three years, state forecasters were overly optimistic about how much the top-tier taxpayers would earn. Looking at past trends is no help — the best statistical analysis suggests that two-thirds of the time, the next year's capital gains receipts will either be 49.5 percent more or 22 percent less than the current year, Schaufele said.

And while concentrated wealth further complicates the estimates, the biggest problem is that Maryland's extremely wealthy taxpayers make different choices from year to year for any number of reasons, among them selling off business interests, hedging anticipated tax burdens or dealing with illness.

“It's not all the same people, year over year,” Schaufele said. “It's not just about the stock market or economics. It's about the individual circumstances of a small group of people. ... It's only recently that we've acknowledged that we are never going to be good at modeling this.”

Revenue estimates are usually within a few percentage points, but a 2 percent error in a $43 billion budget causes a shortfall of hundreds of millions of dollars.

The idea that wealth is highly concentrated and heavily taxed is not new — in Maryland, the top 5 percent pay 40 percent of total income taxes. Top earners pay a higher rate than lower earners.

The progressive tax structure is a point of pride among state Democrats. Maryland is among a handful of states — including New York, New Jersey, Connecticut and California — where the top 1 percent pay at least a quarter of all income taxes.

Last year, one New Jersey billionaire's move to Florida prompted shivers as experts there predicted the state would lose hundreds of millions in revenue.

In Maryland, policymakers are pitching a few ideas to insulate the state when wealth in the hands of avery few dramatically swings and upsets the revenue projections.

“Markets are fluctuating daily based on [President Donald J.] Trump's tweets,” said Sen. Andrew A. Serafini, a financial planner and Western Maryland Republican. “We should handicap this.”

Among the ideas floating around the Maryland State House is to create a contingency budget — a wish list — that would only get money in boom years.

“We don't want to be Clark Griswold expecting the bonus at Christmas and getting — what — the jelly of the month club instead,” said Serafini, referring to the cult-classic move “National Lampoon's Christmas Vacation.”

“We've got to get real,” he said.

Another proposal, modeled loosely after Virginia, would assume that the state would receive the 10-year average for capital gains taxes, and then put any surpluses aside to compensate for lean years.

California, which has a big number of extremely wealthy taxpayers, adopted a constitutional amendment to deal with reducing budget problems caused by the notoriously unpredictable capital-gains revenue.

Del. Kumar P. Barve, an accountant and Montgomery County Democrat, joked that the best mechanism for solving the problem was “black magic.”

Barve said the new Trump administration could further complicate efforts to predict what happens next.

“When things are going great, money comes gushing out of capital gains,” he said. “With Trump's election, nobody knows what this means for people's portfolios.”

ecox@baltsun.com

twitter.com/ErinatTheSun