The S&P 500 climbed up 8.46 points, or 0.4 percent, to close at 1,955.18. Health care companies led nine of the 10 industry groups in the S&P 500 up.
The Dow Jones industrial average rose 61.78 points, or 0.4 percent, to 16,713.58 while the Nasdaq composite climbed 18.88 points, or 0.4 percent, to 4,453.00.
Markets often slip into a summertime lull in August. Trading desks remain short-staffed until people return from vacation after the Labor Day holiday. Without any major developments, trading volume usually dries up and stock indexes turn sleepy, as if stuck in their beach chairs.
The S&P 500 is still hovering near record highs, leading some analysts to fret that the market looks too expensive. Lawrence Creatura, a fund manager at Federated Investors, argued that the solid second-quarter earnings season, which is nearly wrapped up, should put investors' worries about high prices to rest.
The S&P 500, for instance, has gained nearly 6 percent this year. "That's an interesting number: 6 percent just happens to be the average earnings growth rate over the very long term," he said.
In Thursday trading, the Class A shares of Warren Buffett's Berkshire Hathaway conglomerate crossed the $200,000 mark, making the highest-priced U.S. stock even more expensive. Buffett has never split Berkshire's A shares to make them cheaper, although Berkshire created more affordable Class B shares, which closed Thursday at $135.30 Berkshire's Class A shares rose $3,241, or 2 percent, to end at $202,850.
Kohl's, a department-store chain, turned in quarterly profits that were slightly better than analysts' expectations. Sales slipped but the company cut costs. Kohl's surged $1.80, or 3 percent, to $56.91.
After the market closed Wednesday, Cisco Systems reported falling quarterly sales and profits. The technology company also announced plans to lay off 6,000 workers, roughly 8 percent of its workforce. Cisco's stock dropped 66 cents, or 3 percent, to $24.54.
In Europe, more reports showed the region's economic recovery has stalled. Germany's economy shrank 0.2 percent from April to June, while the French economy stagnated. But both France's CAC 40 and Germany's DAX closed with gains of 0.3 percent. Britain's FTSE 100 rose 0.4 percent.
"Investors appear to be betting that the continued raft of disappointing economic data could compel the European Central Bank to take further steps to help try and boost economic activity before the end of the year," said Michael Hewson, chief market analyst at CMC Markets.
In the market for U.S. government bonds, the yield on the 10-year Treasury note fell to 2.40 percent. Earlier, it touched 2.38 percent, its lowest level this year.
The price of oil fell sharply on speculation that economic weakness in Europe would lead to lower demand for fuel. Benchmark U.S. crude fell $2.01 to close at $95.58 a barrel on the New York Mercantile Exchange, its lowest close since Jan. 21.
In metals trading, the price of gold edged up $1.20 to $1,315.70 an ounce. Silver settled up six cents to $19.91 an ounce. Copper fell two cents to $3.09 a pound.