Economies in most states have stabilized after five years of recession and recovery, inspiring new confidence in state bonds, according to the ratings agency Moody’s.

In a report issued to investors last week, Moody’s upgraded its outlook on U.S. states to stable, five years after issuing negative ratings. The agency revised its ratings for six states — Washington, Minnesota, Maryland, Virginia, New Mexico and Missouri — from negative to stable as well.

Improvements in consumer confidence and the housing sector indicate more stable economies less likely to be harmed by possible federal budget cuts, while strong performance in the stock market has bolstered state revenues, the report found. Moody’s projections estimate unemployment rates will fall to pre-recession levels by 2017.

State tax collections have risen on a year-over-year basis for 13 quarters, Moody’s reported, and the stock market has fueled the growth of revenues from capital gains. State tax revenues exceeded pre-recession levels in the fourth quarter of 2012, according to a Rockefeller Institute report, and 2013 revenues are likely to exceed 2008 revenues, when adjusted for inflation. Those revenues are exceeding state budget forecasts.

Housing prices rose by between 5 and 10 percent in 19 states in 2012, while the states hit hardest by the recession — Arizona, California and Nevada — saw the sharpest price increases. In Arizona, home prices rose by 20.2 percent, the most robust growth in the country. Still, home prices remain 22 percent below their 2006 peak, according to Moody’s Analytics. Housing prices showed the strongest growth in the West, though prices are still declining in Northeastern states like Vermont, New Hampshire, Rhode Island, Connecticut and New Jersey.

And states are replenishing rainy day funds depleted by the great recession. The National Association of State Budget Officers reported the median reserve increased to 2.6 percent of state expenditures, double the reserves on hand at the depth of the recession in 2010. The current rate, however, is well below the 8.3 percent median states had set aside in 2008. But seven states — California, Connecticut, Hawaii, Illinois, Maine, New Hampshire and Oregon — maintain reserve funds of less than 1 percent of state expenditures.

Serious concerns remain, especially in states where state-funded pension obligations continue to grow. Connecticut, Illinois, Kentucky, New Jersey and Pennsylvania will have to spend large amounts of their new revenues on pension liabilites; New Jersey alone will have to spend about 40 percent of its anticipated $1.6 billion revenue growth on pension contributions in 2014, Moody’s found.

Earlier this year, Moody’s improved its outlooks for Michigan and New York from stable to positive. That means bond ratings changes could follow over the next year or two, a Moody’s spokesman said. The service downgraded Illinois, where pension concerns and a lagging economy have the company pessimistic about the state’s finances.