Big name tech stocks like Microsoft and Nvidia spearheaded the advance.

The Dow closed up seven-tenths of a percent while the S&P 500 rose eight-tenths. The Nasdaq gained more than 1%.

The broad-based rally capped a tumultuous week that pulled the Dow and S&P 500 away from a string of record highs. The major indexes all posted weekly losses.

Mercadien Asset Management President Ken Kamen notes that August is a seasonally volatile month for stocks.

"We're kind of in August, which historically has always sent people away, so maybe people are saying, "We're getting more towards the end of August. It's time to come back and play.'"

Investors weren't in the mood to play with Deere. The farm equipment maker's quarterly profit more than doubled, crushing estimates. The company also raised its earnings forecast. But Wall Street sent its shares down 2%.

Still, investors rewarded Foot Locker, driving its shares up over 7%. The retailer's profit jumped nearly 10-fold as shoppers snapped up women's and kids footwear.

Next week, investors will keep a close eye on the annual central bank leaders symposium in Jackson Hole, Wyoming, for clues on the Fed's timeline for tightening its monetary policy.