A brutal week for the stock market ended on a quiet note Friday, but worries about the global economy again pounded copper, gold and other commodities.

Fears about Europe’s debt increased early Friday on news that Moody’s Investors Service had downgraded its ratings of eight Greek banks by two notches.

Investors have been waiting in vain for news that Greece will receive the next installment of a bailout package in time to avoid defaulting on its debt next month. If it defaults, banks throughout Europe are likely to lose the money they invested in Greek bonds — and investors fear that could ultimately lead to a recession in Europe and the United States.

Finance ministers from 20 large countries pledged Friday to take “all necessary actions to preserve the stability of the banking systems and financial markets.” But they offered nothing specific.

Europe’s problems helped feed the heavy selling in stocks this week. But the chief worry was that the United States is headed for another recession and that the Federal Reserve is running out of ways to fight it.

The Dow Jones industrial average rose 37.65 points Friday, or 0.4 percent, to close at 10,771.48. The Dow lost 6.4 percent for the week, its biggest drop since the week that ended Oct. 10, 2008, when it fell 18 percent. That was at the height of the financial crisis.

The S&P 500 index rose 6.87 points Friday, or 0.6 percent, to 1,136.43. For the week, the index dropped 6.5 percent, its worst slide since the first week of August.

The Nasdaq rose 27.56, or 1.1 percent, to 2,483.23.

Nearly two stocks rose for every one that fell on the New York Stock Exchange on Friday. Trading volume was slightly above average at 5.1 billion shares.

John Merrill, chief investment officer at Tanglewood Wealth Management in Houston, said Friday’s respite might not last.

“Nothing goes in a straight line, even markets that are declining steeply,” he said. Merrill said the market was moderating as traders bought shares that looked like bargains after the week’s selling. But the problems that have weighed on markets for months now show no sign of letting up.

Bargain-hunters “bring some stability into the market for a day or two, until they’ve used up their buying power,” Merrill said. “Then the macro issues surface again” and volatility returns.

Commodities from soybeans to metals sank Friday. Gold dropped 5.9 percent, copper lost 6 percent and silver 17.7 percent. Stocks in commodities producers also dropped. Range Resources Corp. fell 11 percent to $58.53. Newmont Mining Corp. fell 3.6 percent to $62.86.

Treasury yields rose slightly from record lows reached Thursday as the quieter stock market reduced traders’ hunger for lower-risk bets such as U.S. government debt. The yield on the benchmark 10-year Treasury note rose to 1.80 percent from 1.71 percent late Thursday. Demand for Treasurys drives their prices higher and their yields lower.

Traders had sold gold to raise cash during Thursday’s sell-off. They dumped other commodities, such as oil and raw materials, because they tend to lose value when the economy weakens.

The rout started Wednesday afternoon after the Federal Reserve announced its third plan in less than three years to lower long-term interest rates.

But the Fed unnerved investors with a dismal view of the economy’s health, spotting “significant downside risks to the economic outlook, including strains in financial markets.” Investors interpreted the Fed’s plans and its statement as indicating that a full economic recovery is years away.

The bleak tone helped drive the Dow and S&P down more than 2 percent Wednesday. When trading resumed Thursday, the selling was furious from the start. The Dow fell as much as 527 points before regaining some ground and closing down 391, or 3.5 percent.

The plunge in stocks followed five straight days of gains. The change in heart came as hopes for a resolution to Europe’s debt were crushed — an expected deal on the next installment of a bailout package for Greece didn’t come. That raised the specter of a default. That combined with the Fed’s disappointing assessment of the U.S. economy had investors fleeing any investment that looked risky.