Stocks wiped out losses as the bond market stabilized after a selloff driven by prospects of a slower pace of Federal Reserve rate cuts.