NEW YORK—The stock market erased an early loss and was trading mixed at midday as hopeful signs emerged about the budget talks in Washington.

The Dow Jones industrial average came back from a 112-point loss and was up 16 points at 12,893 shortly before noon Eastern time Wednesday.

The Standard & Poor's 500 index was down less than a point at 1,398 and the Nasdaq composite was off a point at 2,966.

It was another day of knee-jerk responses in the stock market to headlines about talks between the White House and Congress about how to meet a year-end deadline for a budget deal.

Investors were encouraged by hopeful comments from House Speaker John Boehner. Republicans have been softening their opposition to increasing tax revenue as part of a comprehensive agreement.