NEW YORK (AP) -- Stocks managed to close with modest gains on Wall Street after a day of up-and-down trading.
Coca-Cola rose 4 percent after reporting higher sales of non-carbonated beverages. Johnson & Johnson rose 2 percent after its income rose.
Toll Brothers and other homebuilders fell after a measure of the industry's confidence in the housing market remained low. Apple and Netflix also fell.
Major U.S. indexes moved between gains and losses all day before ending slightly higher.
The Standard & Poor's 500 index rose 12 points, or 0.7 percent, to close at 1,842 Tuesday.
The Dow Jones industrial average gained 89 points, or 0.6 percent, to 16,262. The Nasdaq added 11 points, or 0.3 percent, to 4,034.
Bond prices rose. The yield on the 10-year Treasury note fell to 2.62 percent.