If there were ever a time not to bet the moon on the stock and bond markets, it's now, with U.S. stocks at near-record highs and interest rates on quality bonds at near-record lows. But Wall Street is urging state and local governments to do just that — and they're listening.

Despite the risks, governments are lining up to issue billions of dollars in new debt to replenish their depleted pension funds and, as a bonus, take some pressure off strapped budgets. In some cases, the borrowing makes their balance sheets look vastly better.

Bet Big, Then Go Short Governments that borrow money to fund their pensions often pay less into their pension funds in future years than they're supposed to. Here’s how the 20 biggest pension bonds deals since 1996 have worked out. Explore the app (Cezary Podkul and Cecilia Reyes, ProPublica)

Bankers, who make fat fees for raising the money, are encouraging this borrow-and-bet trend. Their sales pitch is that borrowing at today's low interest rates all but guarantees a profit for the governments because they can invest the proceeds in their pension funds and for decades earn returns higher than the 5 percent or so in interest that they will pay on the bonds.

But there's a catch: If the timing is wrong, these so-called pension obligation bonds could clobber the finances of the government issuers. Pension funds and beneficiaries will be better off because pensions will be more soundly financed. But taxpayers — present and future — might be considerably worse off. They will be running huge risks and could get stuck with a massive tab.

"It's sold as a magic bean," said Todd Ely, a professor at the University of Colorado Denver who has studied pension bonds. "But when it goes bad it's not free. Then it isn't really magic. If it could be counted on to work as often as it's supposed to, then everyone would be doing it."

Plenty of takers are bellying up to the borrowing bar. Governments sold $670 million worth of pension bonds through the first half of this year, more than double the $300 million raised for all of last year, according to deal-trackers at Thomson Reuters.

That total would more than double if Kansas completes a pending $1 billion deal, which would be its biggest bond issue. A $3 billion sale is under consideration in Pennsylvania, that state's largest as well. Lawmakers recently rejected record multibillion-dollar deals in Kentucky and Colorado, but those proposals are expected to resurface. And new proposals are being pitched to other governments.

Pension bonds have waxed and waned since the 1980s, but the current boom is different. An examination by The Washington Post and ProPublica found that it's being driven not only by the prospect of investment profits but also by a new accounting quirk that has largely escaped public notice while morphing into a major marketing tool for Wall Street banks.

The quirk stems from a rule change that, ironically, was meant to force governments to more clearly disclose the health of their pension funds. But a side effect is to allow governments with extremely underfunded pensions to slash reported shortfalls by $2 or more for each $1 borrowed.

A Carrot for Pension Debt New accounting rules from the Governmental Accounting Standards Board give governments an incentive to sell bonds to fix badly underfunded pension plans. Here’s how it works. Q. Why change the rules? GASB, pronounced GAZ-bee, wanted to force governments to give a more accurate picture of their pension obligations and the pension fund assets available to meet them. Q. What is new? Previously, a government could estimate today’s cost of its future pension obligations by using optimistic assumptions about how much it would earn on the assets in its pension fund. Now, if a fund is projected to run out of money, governments must use a lower “penalty” rate for any obligations due after the pension fund is projected to run dry. The penalty rate, currently 4.29 percent but subject to change in the future, is based on what it costs governments to borrow tax-free. The penalty rate matters because the higher the expected rate of return, the lower the cost of the pension obligation today. For example, if you have to pay $40 million to pensioners 15 years from now, it’s a $15 million obligation today assuming a 7 percent annual return. The obligation is $21 million if you assume a 4.29 percent return. Q. How does that encourage borrowing? By putting pension bond proceeds into the pension fund, governments can avoid the penalty rate and can book a reduction greater than the amount borrowed. For example, the town of Hamden, Connecticut, borrowed $125 million and promised to increase pension contributions in future years. The move reduced its unfunded liabilities under the new rules to $280 million from the $600 million we estimate they would have been had the bond sale not taken place. The reduction, about $320 million, is more than double the amount borrowed.

Here's how: If a pension plan is so poorly funded that it is projected to run out of cash, the new rules require it to make less optimistic projections about future returns. That increases the reported pension shortfall. But if governments infuse a big slug of borrowed money into the fund, they can resume using optimistic projections, and the shortfall shrinks.

It's like getting a new credit card, borrowing on it to pay off part of an existing loan, then having the total amount owed magically shrink by more than what is borrowed. Sounds impossible — but it's true.

The impact can be dramatic. In March, the town of Hamden, Conn., reduced its unfunded pension amount by about $320 million with a $125 million pension bond and promises of future payments, according to an estimate by ProPublica and The Post. The Kentucky Teachers' Retirement System said it estimates that a $3.3 billion bond issue plus payment promises could carve $9.5 billion off its unfunded liability.

Those figures don't reflect the decades of debt and risk placed on taxpayers.

The rule change, from the Governmental Accounting Standards Board, has been in the making since 2006, but is only now starting to take effect — and to be noticed. So GASB (pronounced GAZ-bee) is fast becoming a recognized acronym in state capitals.

"GASB is certainly a huge concern," said Beau Barnes, deputy executive secretary of the Kentucky system. Until this year the term was unfamiliar to state legislators, he said, "but in 2015 when you say 'GASB,' most of them have an idea that it's going to be bad."

It's not clear whether anyone involved in the long rulemaking process realized that the change would encourage governments to sell bonds to improve their balance sheets.

We asked GASB Chairman David Vaudt about this, but couldn't get a clear answer. His response was, "We follow our due process, and the input that we consider is from our stakeholders: the preparers, auditors and users" of governmental financial statements.

The question of whether governments will come out ahead in the real world — as opposed to the accounting world — with pension bonds is far from clear. In large part, it depends on governments' willingness to make substantial payments to their pension funds after the bonds are sold.

A review by ProPublica and The Post of the 20 largest pension bonds issued since 1996 found that in three-fourths of the deals, governments did not make their full required contribution in the years after the bonds were sold. Those bonds account for nearly two-thirds of the pension debt issued since 1996, according to Thomson Reuters. In more than half the deals, some proceeds even went on to make annual pension contributions — borrowing from the future to pay today's expenses.

Because of the underfunding, most of the pension funds now are worse off than before the bonds were issued.

In all five recent or proposed bond sales examined — by Kentucky, Kansas, Pennsylvania, Colorado and the town of Hamden, Conn. — the issuers and potential issuers said they were planning to make less than full payments for many years.

"These bonds are pernicious," said Alicia Munnell, director of the Center for Retirement Research at Boston College. "They discourage pension funding. They shift costs forward to future generations."

‘Dark Road With Thorns’

Munnell said that soundly funding pensions is a much more important factor in the overall success of a bond issue than outearning interest costs — which is largely a roll of the dice.

A 2010 study by Munnell's group of all the pension bonds issued since 1986 showed that, in most cases, the interest paid on the bonds exceeded the return on pension fund assets. Returns had been hurt by the 2007-2009 market crash. But a 2014 update, five years into the current bull market, showed the reverse, with most issuers ahead.

Given this mixed history, Wall Street salespeople point to the bonds' other benefits. Bonds offer "immediate budget relief," as Citigroup put it in sales pitches to Colorado and Pennsylvania, whereas funding pensions "contributes to budget stress."

In a pitch book to Kentucky, investment bank Raymond James asserted that the bonds would "materially reduce the reported liability" that the teachers' retirement system would have to disclose under the new GASB rule. Bank of America Merrill Lynch also cited the rules in a pitch book to Pennsylvania. Both banks declined comment, as did others we contacted.

There's big money at stake not only for the prospective borrowers, but for Wall Street as well. The pending $1 billion Kansas issue is expected to generate more than $3 million in fees for bankers, while providing budget relief for Gov. Sam Brownback (R) and lawmakers.

You can see why people whose time horizons don't extend past the next election might like pension bonds: Reducing the required annual pension payments leaves more money for schools, roads and other needs.

Hamden's experience shows how this can play out. In 2014, after years of underfunding, the small New Haven suburb's pension fund was about to run out of money. The town faced the prospect of having to pay pensions directly out of its $211 million operating budget. The tab was projected to grow to more than $60 million annually, said Mayor Curt Leng, an amount Hamden simply couldn't afford without a "gigantic tax increase."

Hamden also would have had to show a huge increase in its unfunded pension liability under the new rules.

Connecticut law requires issuers of pension bonds to make the full required annual pension payments after the bonds are issued — a safeguard to make sure politicians can't dig the hole deeper later on. The law would have compelled Hamden to put in $29.5 million this year.

"We would have had to lay off half our police force and three-quarters of our fire department to make it happen," said Scott Jackson, who was Hamden's mayor when the bonds were issued.

So Hamden — population 61,000 — got the state legislature to pass a law giving "any municipality in New Haven County with a population of less than 65,000" an exemption from the full-payment requirement.

After the bond sale — which doubled the town's outstanding debt — Hamden's pension fund went from almost broke to a still-low 40 percent funded. This year, it put in roughly half its normal required contribution. The town doesn't have to make full payments until 2019.

Even if Hamden ultimately makes the payments and earns its projected 7 percent annual return, the pension won't be fully funded until 2044. If things go badly, its funding level will linger at 40 percent.

Jackson said he doesn't think Hamden had much choice: "If you're staring at a dark road and a dark road with thorns in it," he said, "take the dark road."

Known Unknowns

Issuing bonds to fund pensions originated in the 1980s, when state and local governments realized they could use their tax-exempt status to borrow at low cost and get guaranteed higher returns.

In 1984 and 1985, the first two governments to use the strategy — a school district in Oregon and the city of Oakland, Calif. — sold low-interest tax-exempt bonds and bought annuity contracts that paid their pension funds fixed amounts of money each year.

Because the annuity income exceeded interest costs, the strategy was a surefire winner. "You knew what the annuities were going to pay," said Bob Muszar, president of the Retired Oakland Police Officers Association, who has studied the city's pension bonds. "You don't know what the stock market is going to pay."

Pension Bond Pitchbooks Bankers have sprinkled sales pitches across Pennsylvania, Colorado, Kentucky and Kansas as the states considered record-setting pension bond sales this year. Curious what they had to say? Read the documents here.

Congress quickly decided that it didn't want local governments using their tax-exempt status to mint free money, and closed the loophole in 1986 by making interest on pension bonds taxable. Governments could still borrow to fund pensions — but they had to take on serious risk.

Bankers then changed their sales pitch from "borrow to buy annuities" to "borrow to make a profit in the market." Returns would be nice enough for the issuer to come out ahead, the new pitch went.

Governments can borrow cheaply these days — but the risks of investing pension bond proceeds are unusually high.

Stock prices have more than tripled from their 2009 lows and are elevated by historical standards. At the same time, interest rates on high-quality bonds — the kind pension funds invest in — are at very low levels. When interest rates rise, as is widely expected to happen, bondholders — including pension funds — will get whacked.

Should the U.S. stock market fall 20 or 25 percent soon after bond proceeds are invested, it will put issuers into such a deep hole that they may never come close to making the returns they bet on. In the past 16 years, the market has twice fallen by more than 50 percent.

Given today's markets and governments' histories of cutting pension contributions after selling bonds, the Government Finance Officers Association, Munnell's retirement research center and many credit analysts say they now consider pension bonds a terrible idea. Previously, they were mildly negative. Now, they're wildly negative.

"I think that right now is probably as sketchy a time as any to get into pension bonds," said Dustin McDonald, who leads federal liaison efforts at the finance officers association. "You're gambling with taxpayer dollars that in the end the investments you're making are going to pan out for you. ... I just think it's desperation that makes you make the decision."

The association previously had cautioned against these bonds, saying they were risky. But in January, it officially recommended against using them.

Eric Atwater, the actuary who advised Hamden on its deal, said pension bonds aren't the problem. "It's the potential impact on future behavior after it's done that can cause problems," he said, pointing to so-called pension funding "holidays."

The biggest pension bond in history — Illinois' $10 billion issue in 2003 — shows how pension funds can deteriorate even when the markets are with you.

Illinois has earned more by investing bond proceeds than it has paid out in interest. But after that issue, the state cut back regular contributions and delayed reforms. It later doubled down by selling another $7.1 billion in pension bonds to pay for its annual contributions.

It's no accident that Illinois now has the worst state credit rating in the nation. Its pension funds are more than $100 billion underwater, putting huge pressure on its budget.

One big pension fund seems to have done it right. Wisconsin was soundly funded, though not fully, when it sold $850 million of pension bonds in 2003. The state continued to make the full required payments to its pension, and a 2014 Pew Charitable Trusts study said it was the best-funded state plan in the nation.

Betting on Liquid Assets

Risky Business At an April 23 board meeting of the Colorado Public Employees’ Retirement Association, officials debated the merits of having the state sell bonds to fund the pension. Here is some of what they said. The pension’s executive director, Greg Smith, says he's in favor of issuing a bond. Originally a critic of pension bonds, Smith says he’s in favor of Colorado’s borrowing since it will be good for retirees while the timing risk will be on the state. But the vice-chair of the association didn’t think it was a good idea. Ben Valore-Caplan, who has since resigned, called board members out on the way they were presenting the transaction as a risk-free deal.

Nervousness about making huge, long-term bets has stymied some pension bond proposals — at least for now.

In February, Colorado Treasurer Walker Stapleton steered lawmakers away from authorizing a pension bond sale. Stapleton sent them a chart of the Standard & Poor's 500-stock index showing the two aforementioned 50 percent drops. Given the run-up in prices, he said, stocks were poised for a fall.

In an interview, Stapleton, a Republican, said he opposed letting Colorado's pension system make the state "pregnant" with a liability that could have tripled the state's debt. By making the pension fund look healthier, he said, it would also greatly reduce pressure to reform benefits and bring the system into long-term stability.

Greg Smith, executive director of Colorado's Public Employees' Retirement Association, said as much during an April meeting about the deal. ProPublica and The Post obtained an audio file of the session through an open-records request.

"We are a focus for the next legislative session in terms of potential focus on our benefit structure," Smith said, as he reminded board members that "our duties go exclusively to our members and beneficiaries" while the state bears the risk of any bond deal.

Asked about his remarks, Smith said that the pension bonds are meant to address the "failure to fund past promises," not to impede reforms.

Once legislators realized the bond issue could be as large as $12 billion, support quickly disappeared. "For us, the word 'billion' is a very large number," said state Sen. Chris Holbert (R), who voted against the bond proposal in committee.

One of the major problems with pension bonds, for taxpayers, is that they transform a relatively soft obligation into a hard one. Many governments have made deals to trim pension obligations, especially cost-of-living adjustments. But you can't trim back bond obligations without painful and messy restructuring.

In Pennsylvania, the Republican-controlled legislature would rather trim benefits than incur a hard obligation by supporting Democratic Gov. Tom Wolf's proposal to sell $3 billion in pension bonds.

Wolf wants to pay for the bonds with $185 million a year in projected profits from expanding sales at state-owned liquor stores. On Thursday, he vetoed a Republican package that, among other things, would have converted future pensions into a less-generous 401(k)-style plan.

The alternative? Drinking up to help fund pensions, and hoping not to get a hangover from pouring billions in liquid assets down the drain.