How the Dow Jones industrial average and other major indexes fared on Wednesday

U.S. stocks ended a four-day rally by edging lower on Wednesday as energy stocks fell.

Energy shares slumped following another sharp drop in oil prices after a report showed a smaller-than-expected decline in supplies last week.

Investors were also waiting for the outcome of a vote in Greece that will determine whether the Mediterranean nation will accept austerity measures in exchange for more loans from its creditors.

For the day:

The Dow Jones industrial average slipped 3.41 points, or 0.02 per cent, to 18.050.17.

The S&P 500 edged down 1.55 points, or 0.07 per cent, to 2,107.40.

The Nasdaq composite fell 5.95 points, or 0.12 per cent, to 5,098.94.

For the week:

The Dow is up 289.76 points, or 1.6 per cent.

The S&P 500 index is up 30.78 points, or 1.5 per cent.

The Nasdaq is up 101.25 points, or 2 per cent.

For the year:

The Dow is up 227.10 points, or 1.3 per cent.

The S&P 500 index is up 48.50 points, or 2.4 per cent.

The Nasdaq is up 362.89 points, or 7.7 per cent.