Stockton ranks second worst in its recovery from the recession among the 150 largest U.S. cities, says WalletHub, a social media company that offers comparisons of consumer financial products.

It stands above only San Bernardino, a Southern California city that, like Stockton, was particularly hard hit by the housing downturn and whose municipal government is in the midst of a U.S. Bankruptcy Court reorganization.

Leading in the recovery since the Great Recession ended in 2009 are Laredo and Irving, Texas, both benefiting from an energy boom. Fayetteville, N.C., where the unemployment rate stands at 5.1 percent, well below the U.S. jobless rate, is No. 3.

While Stockton's economy is not among the strongest, WalletHub's comparison, based on various factors and the change over the past five years, put it in a particularly bad light, said Jeffrey Michael, director of the Business Forecasting Center at University of the Pacific.

"One reason Stockton did so poorly in this is they put a municipal bankruptcy factor in there," he said.

Also, the economic recovery didn't really take hold in the Stockton area until 2012, he said.

"That's the good news for Stockton," Michael said. "The more recent years are looking a lot better than the first two years of that five-year period."

Bakersfield, another town benefiting from petroleum development, was No. 23 on the list.

WalletHub said it based its comparison on 18 essential metrics - from the inflow of college-educated workers and number of new businesses to unemployment rates and home price appreciation. It also gave those factors different weights.

For example, the decrease in the bankruptcy rate was given a 0.25 weighting, while municipal bankruptcy was weighted 2, or eight times more.

The full analysis and more information can be found online at wallethub.com.