NEW YORK (MarketWatch) — U.S. stocks came off their session highs on Thursday, but the main benchmarks still closed with solid gains.

Thursday’s positive momentum was fueled by upbeat eurozone data and better-than-expected earnings results.

Investors rushed into cyclical stocks, such as industrials and the energy sector, and unloaded investments considered safer havens, such as Treasurys, sending the yield on a 10-year Treasury note up 6 basis points to 2.28%.

Strong quarterly results from components Caterpillar Inc. and 3M sent the Dow Jones Industrial Average DJIA, -0.87% higher by as much as 300 points during the session. The blue-chip index closed 216.58 points, or 1.3%, higher at 16,677.90.

Caterpillar and 3M shares, in fact, were together responsible for one-third of the Dow’s rally.

The S&P 500 SPX, -1.11% gained 23.71 points, or 1.3%, to finish at 1,950.82, with the industrial and energy sectors leading the way.

The Nasdaq Composite COMP, -1.07% jumped 69.95 points, or 1.6%, to close the day at 4,452.79.

Also pushing higher were the Dow transports DJT, -1.04% , which jumped 174 points, or 2.1%, to 8,786.49.

Jeffrey Kleintop, chief global investment Strategist at Charles Schwab, credited upbeat earnings and an optimistic outlook from Caterpillar as the day’s driving forces, alongside positive economic data from Europe and China, which alleviated recent fears of global slowdown.

Kleintop added that, while it is possible the recent correction has run its course, “volatility is here to stay.” Data: CBOE Volatility Index.

“Investors will have to get used to an environment [marked by a reduction in] Fed backing, higher volatility and a dearth of uncorrelated assets. This calls for investors’ reassessment of their portfolios and their risk tolerance.”

Early Friday, investors had welcomed manufacturing data from the eurozone, which offered some upbeat news at a time when worries about slowing global economic growth had been prompting investors around the world to dump equities. But the report also suggested manufacturers and service providers don’t expect a significant pickup in the pace of activity in the coming months.

The flash PMI index for the U.S. fell to a three-month low in October but still indicated growth. Details in that report, though, suggested that the economy could downshift further in the fourth quarter.

Jobless claims for the latest week rose but remained below the 300,000 level for the sixth straight week, reflecting a low level of layoffs pressuring the job market.

Earnings: Shares of Caterpillar CAT, -0.96% surged 5% after the heavy-equipment maker raised its earnings outlook for the year.

Shares of Tractor Supply Co TSCO, -0.02% surged 16%, after it reported quarterly results after the market close on Wednesday, beating consensus estimates. The stock was raised to strong buy from market-perform by Raymond James.

3M MMM, -1.64% , reported third-quarter earnings that came in above expectations. Shares of the maker of Post-it notes and other industrial goods rose 4.4%.

General Motors GM, -1.31% posted earnings, excluding one-time costs, of 97 cents a share, higher than projections of 95 cents a share. Shares of GM slipped 1.2%.

Southwest Airlines Co. LUV, -1.41% reported third-quarter adjusted earnings that were above Wall Street’s consensus estimate. Shares initially gained but retreated by afternoon, ultimately losing 2.9%. Southwest stock has gained more than 75% since the start of the year.

Shares of Yelp YELP, -4.02% dropped 19%. The online review site late Wednesday posted better-than-expected third-quarter results but issued a weak outlook. See: Millennials are migrating away from the reviews sites Yelp and Angie’s List.

After the bell, Seattle-based notables Amazon.com Inc. AMZN, -1.78% and Microsoft Corp. MSFT, -1.24% released their financial reports, with Amazon paying a significant price for underperforming expectations and Microsoft rallying in the after hours.

Read more about the day’s notable stocks in Movers & Shakers column.