Thanks to a roaring stock market, Illinois and its taxpayers aren't quite as deeply in a pension hole as they were. But with gross unfunded pension IOUs still running at nearly a quarter of a trillion dollars—just for the state alone—the Land of Lincoln continues to drown in red ink.

That's the bottom line of the latest annual look at the conditions of the government retirement systems in the 50 states by Moody's Investors Service.

Moody's uses a lower discount rate than others who monitor state debt, which tends to increase the size of Illinois' hole. Ergo, according to the bond-rating firm, Illinois' adjusted net pension liability as of June 30, 2018, stood at a cool $240.8 billion.

That's more than any other state, with California coming in second—its population is more than three times ours—at $230.8 billion and Texas coming in third at $132.8 billion.

Difficult as it is to fathom, Illinois’ figure actually was a little worse this time a year ago, topping $250 billion in unfunded liabilities. But according to Moody's, the whole reason for the decline was the market, which was really hot but lately has been pretty flat. With Illinois putting in only about two-thirds of what we need to hold even—Moody's "tread water" line—the hole probably already has resumed growing, it says.

The current hole is bad enough. According to the report, it represents 505 percent of own-source (non-federal) revenues, and has grown more than a quarter since fiscal 2014.

If there's a scintilla of good news in the report, it is that the good economy that has boosted investment returns also has boosted the income of state residents. Ergo, as a share of total state personal income, pension liabilities dropped from 36 percent to 33.2 percent in the most recent year.

When it comes to total state debt—total pensions, other retirement costs such as retiree health care, and general obligation bonds for infrastructure and other purposes—Illinois ranks second, at 38.2 percent of state GDP compared to Connecticut's 38.9 percent.

Keeping Illinois company in the high-debt category are New Jersey at 37.9 percent, Hawaii at 35.6 percent and Alaska at 30.6 percent. Every other state is below 30 percent.

Illinois lawmakers are expected to consider some modest changes to improve pensions in their veto session this fall, but they're likely to impact local systems rather than the five statewide systems covered in the Moody’s report. More on that later.