Solid gains among phone companies and some retailers helped nudge U.S. stocks higher on Thursday, a day after the stock market had its biggest drop in eight months. Banks also recouped some of their losses. Energy and materials stocks fell.

The rally came a day after the market’s worst drop since September as political tumult deepened in Washington, stoking worries among investors that President Donald Trump may have trouble enacting tax cuts and other business-friendly policies.

advertisement | advertise on newsday

“People may be wanting to put money to work in stocks, but the bonds they bought yesterday, they’re still going to keep those as a little bit of a hedge, just in case,” said JJ Kinahan, chief market strategist at TD Ameritrade.

The Standard & Poor’s 500 index rose 8.69 points, or 0.4 percent, to 2,365.72. The Dow Jones industrial average added 56.09 points, or 0.3 percent, to 20,663.02. The Nasdaq composite index gained 43.89 points, or 0.7 percent, to 6,055.13. The Russell 2000 index of smaller stocks picked up 5.19 points, or 0.4 percent, to 1,361.08.

Better-than-expected quarterly results from Wal-Mart Stores and retailers such as L Brands helped lift the market.

Traders also welcomed data from the Labor Department showing that applications for unemployment benefits fell last week to the lowest level in nearly three months.