After months of shocking news -- financial institutions on the brink of failure , demand sapped in the credit markets , and declines in the nation 's payrolls and discretionary spending -- even poor earnings gave investors relief .