Stocks were down for most of Tuesday, then rallied in the final minutes of trading after a news report indicated Greece's conservative leader could commit to spending cuts that lenders are demanding. Indexes closed little changed on the day.
The Dow Jones industrial average rose 4.24 points, or 0.03 percent, to close at 12,878.28.
The Standard & Poor's 500 index fell 1.27 points, or 0.09 percent, to close at 1,350.50
The Nasdaq composite index rose 0.44 points, or 0.02 percent, to close at 2,931.83.
For the week so far:
The Dow is up 77.05 points, or 0.6 percent.
The S&P 500 is up 7.86 points, or 0.6 percent.
The Nasdaq is up 27.95 points, or 1 percent.
For the year so far:
The Dow is up 660.72 points, or 5.4 percent.
The S&P 500 is up 92.90 points, or 7.4 percent.
The Nasdaq is up 326.68 points, or 12.5 percent.