NEW YORK (AP) — Stocks are ending mostly higher, giving the Standard & Poor's 500 index its second straight record close.

Major indexes wavered between small gains and losses through much of the day Friday.

The S&P 500 edged up a point, less than 0.1 percent, to 2,122.

The Dow Jones industrial average rose 20 points, or 0.1 percent, to 18,272. The Nasdaq composite edged down two points to 5,048.

Keurig Green Mountain sank 9 percent after announcing a high price for its new cold-drink machine that got investors worried.

Semiconductor maker Applied Materials gained 2 percent after reporting results that came in ahead of analysts' forecasts.

Bond prices rose. The yield on the 10-year Treasury note fell to 2.14 percent.