The S&P 500 closed at 1,502, up eight points, or half a percent. It was the eighth straight gain, the longest winning streak since November 2004.
The Dow Jones industrial average closed at 13,825, up 46 points. The Nasdaq gained 19 points to 3,149.
Procter & Gamble, the world's largest consumer products maker, rose 4 percent after reporting that its quarterly income more than doubled. Starbucks also rose 4 percent after reporting higher profits.
Rising stocks outnumbered falling ones 3 to 2 on the New York Stock Exchange. Volume was about average at 3.4 billion shares.