Industrial companies led U.S. stocks higher Friday, giving the stock market its second gain in two days.

The rally was broad, with all 11 industry sectors in the Standard & Poor’s 500 index closing higher. That included energy stocks, which climbed as the price of crude oil rose.

advertisement | advertise on newsday

The gains helped trim some of the losses that traders booked two days earlier when the stock market posted its worst day in eight months amid deepening political turmoil in Washington.

Investors appeared to shrug off those concerns on Friday, preferring instead to focus on the latest batch of corporate earnings, which included solid results from Deere & Co. and other companies.

“If you took a week off, you probably thought you didn’t miss much, because we’re at about the same levels today as we were last Friday,” said Sean Lynch, co-head of global equity strategy at Wells Fargo Investment Institute. “And yet, we spiked to a new all-time high on the S&P on Monday, we suffered the worst decline of the year on Wednesday, and again we’re back within 1 percent of that all-time high today.”

The S&P 500 index rose 0.7 percent, to 2,381.73. The Dow Jones industrial average added 141.82 points, or 0.7 percent, to 20,804.84. The Nasdaq composite index gained 0.5 percent, to 6,083.70. — AP