At bubble highs, pension funds are barely fully funded. Now we're finding most pension funds (and individual savers) are swimming naked.

Public pension plans lost a median 7.9% in the year ended June 30, according to Wilshire Trust Universe Comparison Service data released Tuesday, their worst annual performance since 2009 and a fresh sign of the chronic financial stress facing governments and retirement savers.

Much of the damage occurred in April, May and June, when global markets came under intense pressure driven by concerns about inflation, high stock valuations and a broad retreat from speculative investments including cryptocurrencies.

Public pension funds have hundreds of billions of dollars less on hand than they will need to cover future benefit promises. A record run in stocks afforded them a decade of relative breathing room. But even after a blockbuster median return of nearly 27% last year, many retirement systems remained underfunded with the growth in expected benefit costs outpacing the growth in assets.

That shortfall, along with aggressive annual return targets of about 7%, have led pension funds to embrace investment risk, with a median equity allocation of 57% as of June 30, according to the Wilshire data.