NEW YORK — The stock market broke two days of losses on Wednesday with solid gains as investors piled into shares of banks and energy companies. The yield on government bonds rose again, and investors dumped phone and real estate companies, sending them down nearly 2 percent. Investors find those stocks less attractive as a source of income relative to bonds when yields are rising.

On Wednesday:

The Dow Jones industrial average climbed 112.58 points, or 0.6 percent, to 18,281.03.

The Standard & Poor’s 500 index gained 9.24 points, or 0.4 percent, to 2,159.73.

The Nasdaq composite rose 26.36 points, or 0.5 percent, to 5,316.02.

For the week:

The Dow is down 27.12 points, or 0.2 percent.

The S&P 500 is down 8.54 points, or 0.4 percent.

The Nasdaq is up 4.02 points, or 0.1 percent.

For the year:

The Dow is up 856.00 points, or 4.9 percent.

The S&P 500 is up 115.79 points, or 5.7 percent.

The Nasdaq is up 308.61 points, or 6.2 percent.

VIAThe Associated Press
The AP is one of the largest and most trusted sources of independent newsgathering. AP is neither privately owned nor government-funded; instead, as a not-for-profit news cooperative owned by its American newspaper and broadcast members, it can maintain its single-minded focus on newsgathering and its commitment to the highest standards of objective, accurate journalism.