This may come as something of a surprise to regular readers of this column, but I’m feeling rather optimistic these days about the U.S. economy.

It’s not that the statistical evidence (lower unemployment rate, a spike in housing starts) is so compelling. Ours remains a weak recovery that looks good largely because it has persisted in the face of political dysfunction, rising oil prices, a looming fiscal contraction and global headwinds. In the short term, the possibility of a quarter or two of near-zero growth cannot be ruled out.

What I tend to focus on, however, are the longer-term structural adjustments and rebalancing in our post-bubble economy that need to occur before a robust and sustainable recovery can begin. And from that perspective, the signs are positive.

For starters, as bad as things may seem here at home, they look even worse just about everywhere else. After years of watching the momentum and the investment capital flowing out of the country, it’s now encouraging to see it begin to flow back our way. Not only is that helping to hold down interest rates and lift stock prices, but there are signs of renewed interest on the part of foreign firms in expanding production and operations in the United States. That translates into more jobs and higher incomes.

A decade ago, places such as China and India seemed to have all the mojo — so much so, in fact, that they wound up with bubble economies of their own. Now, in face of excess capacity and sharply higher operating costs, that excitement has waned, along with the flow of capital and technology. Even the Chinese have decided to get serious about rebalancing, allowing their famously manipulated currency to rise to something closer to its real market value while redirecting some of its trade surplus with the United States from Treasury bonds to direct investments in American companies.

There is a growing realization among investors and global executives that China and India still lack the political and institutional infrastructure necessary for an advanced economy. Another round of reforms will be required before those countries will see a return to the growth rates of the past decade.

Europe is a different story. The bubble years allowed much of Europe to avoid making the kind of structural changes necessary to put its social welfare system on a sustainable fiscal path and reform its labor and product markets. The euro crisis — which is both a banking crisis and a sovereign debt crisis — has forced Europeans to begin addressing those issues. But the noisy process will take years to complete, if for no other reason than it requires Europeans to accept, at least in the short run, a lower standard of living. That Europe will dip back into recession is all but certain.

My optimism about the U.S. economy, however, is not based simply on the woes of others, but also on the restructuring momentum I see here at home.

After an extended period of denial and pushback, the financial sector is finally accepting the reality that it had become too big, too risky and too generous with its compensation. Under pressure from shareholders and regulators, big banks are shrinking their leverage and balance sheets, off-loading their hedge fund-like activities, shedding employees and reducing the percentage of net revenue set aside for compensation.

“There’s way too much capacity, and compensation is way too high,” James Gorman, chief executive of Morgan Stanley, recently told the Financial Times.

Last week’s sacking of Citigroup chief executive Vikram Pandit in favor of a more traditional commercial banker was less a commentary on Pandit’s efforts to steer the bailed-out bank back into solvency than it was a strategic statement by outside directors about where the bank needs to go in the future. It’s only a matter of time before Bank of America’s Brian Moynihan meets the same fate.

And while it’s taken years, Wall Street is finally being forced to accept a larger share of the cost of its reckless behavior in the form of billion-dollar court settlements with regulators, shareholders and customers. I’m not so naive as to think these settlements will transform Wall Street’s culture, but the pain in terms of money lost and careers ruined has been sufficient to have tamed it for a while.

Wall Street also hasn’t seen the last of its regulatory challenges. Recently, several of the normally sober and conservative presidents of regional Federal Reserve Banks have spoken publicly about the need to “break up” the big banks while the Fed’s lead official on bank regulation, Governor Dan Tarullo, has suggested a cap on the amount of money big banks can borrow outside of their normal deposits.

Surely, no sector of the U.S. economy is in greater need of structural reform than health care, with its world-beating price tag and mediocre outcomes. That reform is now shifting into high gear. Even before Obamacare has kicked in, many doctors, hospitals and insurers are moving to reorganize the way care is delivered and paid for. In these new “accountable care” organizations, doctors will be on salary and medical records will be electronic, facilitating coordination of care and adherence to best practices.

Health policy experts have been kicking these ideas around for decades, but when you talk to them these days, you get a real sense of excitement that they finally are taking hold. Big, established firms are investing big money to develop staffs and systems, while venture capitalists and private-equity firms are placing significant bets in the hope of getting in on the ground floor. In the short term, this process is likely to generate growth in jobs and income. Longer term, the potential to save money and boost productivity are enormous.

Less far along, but no less inevitable, are the long-awaiting structural reforms to the American system of education. If you’ve been following the news — the teachers strike in Chicago, the brouhaha at the University of Virginia and the steady stream of stories about the debt load of college graduates — you get the clear sense that the debate is no longer over whether the education establishment will be forced to bring down costs and improve educational outcomes. The only debate now is about how and how much.

It’s no longer out of bounds to talk about faculty productivity and accountability, or tying pay or promotion to measurable outcomes. Charter schools are now an accepted part of the mix, and resistance to the use of technology is crumbling. To the delight of some and horror of others, private capital is lining up to invest.

The granddaddy of structural problems, of course, is the federal budget deficit, but even there I’m hopeful that a solution may come sooner than later. Republicans and Democrats had hoped that this year’s would be a “clarifying election”— that the voters would finally decide to back one approach or the other. But with two weeks to go, it looks like the only thing that the voters are willing to clarify is that they don’t back either approach and would prefer that each side compromise.

There is already a bipartisan majority in the Senate prepared to accept that judgment, with a working group quietly crafting such a compromise. And if, as expected, Republicans lose a few seats in the House and fail to take control of the Senate, House Speaker John Boehner, with strong backing from the business community, may be willing to put his political career on the line by delivering 100 Republican votes for a grand budget bargain — one that raises about a trillion dollars in additional revenue over the next decade without raising tax rates.

The Australian foreign minister, Bob Carr, was recently quoted as saying the United States was “one budget deal away from restoring its global preeminence.” It looks pretty much that way to me as well.