Stocks rose for the third day in a row Wednesday as machinery and mining companies traded higher. Oil prices also continued their rise, and stocks and oil prices are at their highest in almost a year.

Metals prices jumped as the dollar got weaker. Also trading higher were makers of beverages and other consumer goods. That’s because a weaker dollar could mean better sales and bigger profits for U.S. companies that do a lot of business overseas.

advertisement | advertise on newsday

Kate Warne, an investment strategist for Edward Jones, said the dollar weakness won’t last: the Federal Reserve is preparing to eventually raise interest rates, which will make the dollar stronger, while stimulus policies of central banks in Europe and Japan will cause their own currencies to depreciate.

“The dollar will bounce around,” she said. “It’s not likely to weaken a whole lot given the gap in central bank policies.”

The Dow Jones industrial average rose 66.77 points, or 0.4 percent, to 18,005.05. The Standard & Poor’s 500 index gained 0.3 percent, to 2,119.12. The Nasdaq composite added 0.3 percent, to 4,974.64. The S&P 500 and oil prices are both at their highest levels since July, and the Nasdaq hasn’t been this high since Dec. 31. — AP