Over the past several weeks, you might have found it rather curious that at a time when coronavirus deaths were still climbing and economists and business leaders were warning of a long and deep recession, a rally was underway on financial markets. Stock prices have regained half of what they lost since their peak in February, while on the bond market, companies were borrowing near-record amounts, and the interest rates paid by the most heavily indebted companies were going down, not up.

It’s not only curious — it’s disturbing. What it suggests is that American capitalism has entered a new and dangerous phase, one in which the Federal Reserve has assumed the role as a financial backstop and lender of last resort to every major corporation, along with the banks and investors that provide them with capital.

By declaring that it will do “whatever it takes” to assure that a corporate sector that borrowed too much can borrow a bit more, the Fed has effectively put a floor under stock and bond prices. As a result, it’s no longer just banks that are too big to fail — it’s now the entire corporate sector.

The Fed would have us believe that it has offered no such guarantees and sent no such signal to investors. Rather, it is simply fulfilling its mandate to keep U.S. workers fully employed by providing “liquidity” to companies during a once-in-a-lifetime global pandemic that nobody could have anticipated.

But that is only half the story. The other half is that because of loose money and the lax regulatory policies it has embraced for most of the past 30 years, the Fed has made it possible for corporations, banks and investment funds to take on so much debt, with so little of their own capital at risk, that whenever a recession or financial crisis threatens, the government has no choice but to bail them out.

As a result, Wall Street and the corporate sector have now achieved that state of financial nirvana in which private investors earn outsize rewards during good times, while in bad, outsize risks are socialized through government rescues.

To someone from outside Wall Street — and even to a few inside — this looks less like capitalism than state control of the economy through the credit channel. What the Agriculture Department does for farmers through crop supports, the Fed now does for Wall Street and the rest of the corporate sector.

Fed officials have learned to play a cute messaging game around this creep toward corporate and investor socialism, denying it in public speeches and news conferences even as their actions send the unmistakable signal to Wall Street that “we’ve got your back.”

Where all this now plays out is in several obscure “loan facilities” and “special purpose vehicles” that the Fed set up last month — initiatives that for the first time will put the Fed in the business of buying the debt of private companies. Since its founding, the Fed has routinely carried out its mandate to manage the country’s money supply by buying and selling U.S. government bonds or government-guaranteed securities, and increasing or decreasing the amount of reserves in government-regulated banks. Now, however, the Fed has committed more than $2 trillion to buying (or taking as loan collateral) corporate bonds, shorter-term commercial paper, shares of corporate bond funds and ETFs and securitized packages of commercial loans. In effect, the Fed has turned itself into the world’s largest hedge fund — only unlike a hedge fund, it won’t have to raise its money from investors. Instead it simply prints it.

In announcing this extraordinary expansion of its risk-taking and market intervention, the Fed took pains to assure that it would only be dealing in loans and credit instruments from companies that had investment-grade credit ratings before the pandemic — solidly profitable businesses with modest debt that because of factors outside their control now find themselves in a cash squeeze. As they see it, providing such companies a bridge loan is not a reward for risky behavior but the only way to prevent a short economic downturn from turning into a long and deep recession.

But stock and bond investors are clearly expecting the Fed to do more than that. They know that more than half of the corporate lending during the recent credit bubble was not investment grade. They understand that if those companies default or are unable to roll over their debt, there will be a cascade of layoffs, bankruptcies and panic-selling. And they are now confident that, to avoid that outcome, the Fed will have no choice but to do for “junk” credit what it has already done for investment-grade loans — buy enough of it to stabilize markets and give investors and lenders the confidence to extend new loans.

The dilemma the Fed now faces is that the only way it has to rescue the economy is to lend more money to businesses, households, governments and financial institutions that have already borrowed too much. That debt has made the economy vulnerable to any economic shock that has come along, requiring at least four extraordinary government rescues since 1987. And with each rescue, the economy becomes more indebted, more vulnerable, more addicted to cheap and easy money and more reliant on government rescues.

Crises like these are both the worst of times and the best of times to try to break this economic doom loop and bring to heel a shadow banking system that is responsible for creating all that credit.

It is the worst of times because refusing to pile more debt on debt will bring the economy crashing down on innocent people of modest means who will sacrifice jobs, income, savings and opportunity.

It is the best of times because these are the times when the folly and unsustainability of our credit addiction is exposed and there is the political will to fix it.

What would “fixing it” mean?

In the short term, fixing it would mean making any Fed rescue of “junk” credit contingent on having investors and financiers accepting significant losses while allowing the government to reap the benefit if things turn out better than expected. Creating the mechanism for such a workout will be a challenge, but surely the overpaid lawyers and investment bankers who created the shadow banking system are clever enough to figure it out.

Fixing it would impose a regulatory regime on the shadow banking system similar to the one that limits the risk-taking of traditional banks. That would mean having government bank examiners scrutinize securitized loan packages to ensure that the loans met the same standards as those of regulated banks. It would mean requiring sponsors of loan packages to absorb the first 10 percent of losses on the securities they create. And it would mean imposing a tax on every financial transaction to create a stabilization fund that can be used to reimburse the Fed and the Treasury for the cost of financial-sector rescues — the equivalent of the deposit insurance premiums paid by regulated banks.

Fixing it would mandate that the Fed “unprint” all the money it creates during rescues once the crisis has passed, even if that makes boom times less boomy, with tighter credit and less job growth.

And fixing it means moving corporations away from a private-equity model that requires them to load up with debt, expand through acquisition and distribute all profits to investors, to a stewardship model that focuses on creating sustainable businesses through organic growth, modest leverage and reinvestment of profits.

Chair Jerome H. Powell and his Fed colleagues have been bold and creative in rescuing the financial system and the economy from the ravages of the coronavirus. What they have yet to demonstrate is that they can summon the same boldness and creativity to rein in a runaway shadow banking system and wean the economy off its addiction to cheap and easy credit. The bet on Wall Street is that they never will.