Stocks accelerated their losses in the final hour of trading to close lower Wednesday, amid ongoing nervousness over the euro zone and after credit-rating agency Egan-Jones downgraded Spain's credit rating to CCC+ from B.