NEW YORK — U.S. stocks bounced back on Monday after losing ground for three weeks as the dollar’s rally against the euro abated.

Elsewhere in financial markets, oil closed at a six-year low, below $44 a barrel, as supplies continue to outpace demand. Treasurys gained after some mixed reports on the economy.

The stock market has stumbled in recent weeks as the dollar has surged against the euro. The U.S. currency has been rising on expectations that the Federal Reserve will start to raise interest rates even as the European Central Bank continues to provide stimulus to that region’s economy.

A stronger dollar is a problem for big U.S. companies that rely on overseas sales because it makes their goods more expensive in foreign markets and reduces the value of the profits they bring back home to the U.S.

The Standard & Poor’s 500 index rose 27.79 points, or 1.4 percent, to 2,081.19. It was the biggest gain for the index in six weeks.

The Dow Jones industrial average climbed 228.11 points, or 1.3 percent, to 17,977.42. The Nasdaq composite jumped 57.75 points, or 1.2 percent, to 4,929.51.