Thanks to a strong stock market and rising interest rates, more companies are nearing or returning to full funding status on their corporate pension plans. That could signal a major asset allocation switch, as companies try to adjust their portfolios to avoid damage from any future financial crises.

The funded status of large U.S. corporate pension plans edged lower in August, but companies are still on track to notch a significant improvement this year thanks largely to rising interest rates.

Pension funding at 100 of the largest U.S. pension plans retreated slightly to 89.4% in August compared to 89.9% in July, after rising for the past three months, according to actuarial consulting firm Milliman Inc.

Several large corporations’ pensions have improved dramatically this year, and many are now actually overfunded after years of rising deficits, according to estimates from J.P. Morgan Asset Management.

For millions of employees covered by corporate pension plans, this was a good quarter.

Companies are getting closer to bringing their pension plans back to fully-funded status this quarter, with companies including Ford Motor Co., announcing “significant” improvements in funding on Wednesday.

Rising interest rates make it more expensive for companies to borrow, but they also help them in other ways. Namely, by bolstering their corporate pension plans. According to data from Mercer, a 46 basis-point increase in corporate bond yields helped reduce the combined pension deficit of the S&P 1,500 by $150 billion during the month, leaving a $269 billion deficit in the plans. That helped push the funded ratio—the difference between the plan assets and their liabilities – to 86% from 80% at the end of April. That’s the best showing since July 2011.

Longer lifespans are putting some pressure on corporate defined benefit plans, but changes in the interest rates used to calculate liabilities are by far the biggest issue facing pensions, experts say.

Pensions are becoming the story of this earnings season, as United Parcel Service Inc. on Thursday joined a steady stream of companies that took heavy hits from their pension liabilities in the fourth quarter.

UPS reported a fourth-quarter loss after taking a pension-accounting related charge of $3 billion. As the WSJ’s Tess Stynes reports, that masked broad revenue growth for the shipping company.