Stocks soared on hopes that policymakers had finally hit on the right formula to thaw the frozen credit system and quell the financial calamity that has hammered giant banks and small investors alike .