After the bell, however, shares of both Amazon.com Inc and Apple Inc moved sharply lower following the release of quarterly results.
Amazon was down 4% in extended trading after forecasting holiday-quarter sales below Wall Street expectations. Apple fell more than 3% in late trading after it said supply-chain woes cost it $6 billion in sales in the last quarter and that the impact will be even worse in the holiday-sales quarter.
During the regular session, heavyweights including Tesla Inc , finishing up 3.8%, and Apple, which closed up 2.5%, spurred on the Nasdaq and the S&P.
The S&P was also boosted by Caterpillar Inc, which closed up 4% after reporting a better-than-expected quarterly profit on rising commodity prices and a bullish forecast from drugmaker Merck & Co Inc, which added 6%.
Investors also eyed Washington, where President Joe Biden said he had secured a new $1.75 trillion framework for economic and climate change spending.
“Earnings continue to be very good,” said Bill Stone, chief investment officer at the Glenview Trust Co in Louisville, Kentucky, who also noted that Biden’s framework, if it succeeds, would not boost corporate taxes as investors had previously feared.
“Underneath the surface, that’s a positive for corporate earnings” going forward, said Stone.
The Dow Jones Industrial Average closed up 239.79 points, or 0.68%, at 35,730.48, the S&P 500 gained 44.74 points, or 0.98%, to 4,596.42 and the Nasdaq Composite added 212.28 points, or 1.39%, to 15,448.12.
All 11 major S&P sectors closed higher, with Real Estate , consumer discretionary, and industrials leading the gains.
Solid earnings also helped offset a report from the Commerce Department which showed the US economy grew at a 2% annualized rate in the third quarter as COVID-19 infections flared up, short of the 2.7% estimate, while another set of data showed fewer Americans filed new claims for unemployment benefits last week as the labor market slowly improves.
“Clearly we are seeing a large batch of macroeconomic data that has been coming through during the middle of third-quarter earnings reporting season and you are seeing a little bit of a tug-of-war that exists between macroeconomic data that is appearing to be somewhat softer at the margin and corporate performance which is proving to be better than expectations,” said Bill Northey, senior investment director at US Bank Wealth Management in Minneapolis.
Earnings reports have helped advance in the benchmark S&P index in 10 of the previous 12 sessions, with analysts now expecting profits for S&P 500 companies to grow 38.6% year-on-year in the third quarter.
Of the 244 S&P 500 companies that had reported by Thursday morning, 82% had beaten estimates.
However EBay Inc shares finished down 6.8% after the e-commerce firm forecast downbeat holiday-quarter revenue.
Advancing issues outnumbered declining ones on the NYSE by a 2.15-to-1 ratio; on Nasdaq, a 2.46-to-1 ratio favored advancers.
The S&P 500 posted 34 new 52-week highs and 4 new lows; the Nasdaq Composite recorded 104 new highs and 96 new lows.
On US exchanges 11.05 billion shares changed hands compared with the 10.34 billion moving average for the last 20 sessions.