NEW YORK – It was a quiet end to a wild month for financial markets.

Stocks edged higher for a fourth straight day Wednesday on a report that factory orders surged in July. The Dow Jones industrial average turned higher for the year. The Dow’s winning streak ended a tumultuous August that included four consecutive days of swings of 400 points or more, a first in the history of the index.

A surge in factory orders indicated to investors that the manufacturing industry is still healthy. Orders rose 2.4 percent in July, the largest increase since March, after falling 0.4 percent in June. That decline caused worries that manufacturing, one of the best-performing areas of the U.S. economy since the recession ended two years ago, might be starting to sputter.

The Dow rose 53.58 points, or 0.5 percent, to end at 11,613.53. It fell 4.4 percent for the month, although it is now up 0.3 percent for the year. Aluminum maker Alcoa Inc. rose 3.6 percent, the most of the 30 companies that make up the Dow average.

Joy Global rose 1.3 percent after the mining equipment maker said its earnings rose 46 percent because of strong global demand for commodities like copper and coal.

That helped to push up other stocks in the mining and commodities industry. Equipment giant Caterpillar Inc. rose 1.3 percent.

The Standard & Poor’s 500 index rose 5.97, or 0.5 percent, to 1,218.89. It fell 5.7 percent for the month. Financial stocks were the worst performers in August as many worked to raise capital to comply with new regulations.

On Wednesday, nine of the 10 company groups that make up the index rose. The telecommunications industry was the only one to fall.

AT&T Inc. plunged 3.9 percent after the Justice Department filed a lawsuit to stop the company’s $39 billion merger with rival T-Mobile USA. Sprint Nextel Corp., which opposed the deal, rose 5.9 percent.

The Nasdaq composite index rose 3.35, or 0.1 percent, to 2,579.46. It fell 6.4 percent for the month.

The Dow, S&P and Nasdaq each had their worst August since 2001.

The market is closing out an extraordinarily volatile month. The Dow was as high as 12,132 this month and as low as 10,719 in the span of 23 trading days.

The volatility that began in late July seeped into August amid the debate in Washington over extending the country’s borrowing limit to avoid a debt default. The declines sped up the week ended Aug. 5, when all three major indexes entered a correction, or a decline of 10 percent or more from a recent peak. Investors feared that Italy or Spain — Europe’s third and fourth largest economies — would be unable to repay their debts. Some economists began to worry that the U.S. would slip into another recession.

Then came even worse news. Standard & Poor’s lowered the nation’s credit rating, and stocks plunged.

Stocks had their first positive week in a month the week ended Aug. 26 after Federal Reserve Chairman Ben Bernanke said the U.S. remains on pace for long-term economic growth. The Dow has risen for seven of the last eight volatile.”