U.S. stocks rose Monday as central banks pumped more cash into the global financial system.

Signs that U.S. consumers spent more than expected in July despite the housing market's turmoil also gave stocks a lift.

The gains suggested stocks could stabilize after several days of volatility on worsening lending conditions, sparked by mounting repayment problems with U.S. subprime mortgages.

Wall Street got some relief from recent worries with the news that investment bank Goldman Sachs Group Inc. (GS) and outside investors will pump $3 billion into a hedge fund that has been hammered by recent market turmoil — in contrast to other major banks, which recently shut funds.

"People are rotating back into stocks that were hit pretty hard last week. There is a bit more confidence there is liquidity in the system," said Scott Vergin, portfolio manager at Thrivent Financial in Minneapolis.

The Dow Jones industrial average was up 54.30 points, or 0.41 percent, at 13,294.49. The Standard & Poor's 500 Index was up 5.72 points, or 0.39 percent, at 1,459.36. The Nasdaq Composite Index was up 5.90 points, or 0.23 percent, at 2,550.79.

Goldman Sachs shares added 0.1 percent to $180.71.

The Federal Reserve added $2 billion in temporary reserves and said it was prepared to take additional steps to inject cash as needed. Earlier, the Bank of Japan and the European Central Bank also said they were pumping more cash into banking systems.

Retail sales rose more than expected in July, the Commerce Department said, which also revised June's figures upward to show a smaller drop. The S&P retail index rose 0.7 percent.

Another catalyst for the market's gains was the better outlook for earnings. Second-quarter earnings are now projected to rise 8.6 percent from the year before, compared with an estimate of 7.8 percent last week, according to Reuters Estimates.

Despite the improved mood on Wall Street, signs of trouble in the mortgage sector remained.

Accredited Home Lenders Holding Co. (LEND) said Monday it had sued private equity firm Lone Star Funds, seeking to force it to complete the $400 million takeover of the money-losing subprime mortgage lender.

Shares of Accredited tumbled 30 percent to $6.25 and topped the list of the Nasdaq's biggest percentage losers.

Shares of Blackstone (BX) Group rose after the private equity firm reported a near tripling of its quarterly net income. Blackstone shares rose 6 percent to $26.80 on the NYSE.