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.

On Wednesday:

The Dow Jones industrial average picked up 66.77 points, or 0.4 percent, to 18,005.05.

The Standard & Poor's 500 index advanced 6.99 points, or 0.3 percent, to 2,119.12.

The Nasdaq composite gained 12.89 points, or 0.3 percent, to 4,974.64.

For the week:

The Dow is up 197.99 points, or 1.1 percent.

The S&P 500 is up 19.99 points, or 1 percent.

The Nasdaq is up 32.13 points, or 0.7 percent.

For the year:

The Dow is up 580.02 points, or 3.3 percent.

The S&P 500 is up 75.18 points, or 3.7 percent.

The Nasdaq is down 32.77 points, or 0.7 percent.