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.
"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.
Bond prices slipped. The 10-year Treasury yield rose to 2.23 percent from 2.22 percent.
Despite the day's gains, the major stock indexes were still on course to end the week in the red.
Stocks appeared headed for another down day early Thursday following sell-offs in Asia and Europe. But better-than-expected quarterly results from Wal-Mart Stores and retailers such as L Brands helped lift the market.
Wal-Mart gained $2.42, or 3.2 percent, to $77.54, while L Brands rose $1.29, or 2.7 percent, to $49.69.
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.
Among other big movers: Incyte surged 6.9 percent on growing analyst optimism over the biopharmaceutical company's work developing cancer treatments. The stock gained $8.31 to $128.80.
Weak quarterly results from other companies sent those stocks lower.
Ascena Retail Group sank 27 percent after the retailer cut its forecast for its fiscal third quarter and full year, citing lagging customer traffic and other challenges. The stock lost 76 cents to $2.06.
Cisco Systems fell 7.2 percent a day after the internet gear maker said it expects revenue in its fiscal third quarter to be down from a year earlier. The company also said it was laying off 1,100 workers in addition to the 5,500 job cuts Cisco announced last August. The stock gave up $2.44 to $31.38.
Benchmark U.S. crude oil futures rose 28 cents, or 0.6 percent, to close at $49.35 a barrel in New York. Brent crude, used to price international oils, climbed 30 cents, or 0.6 percent, to settle at $52.51 a barrel in London. In other futures trading, natural gas fell 1 cent to $3.18 per 1,000 cubic feet. Wholesale gasoline was little changed at $1.60 per gallon. Heating oil rose 1 cent to $1.54 per gallon.
In metals trading, the price of gold fell $5.90 to settle at $1,252.80 per ounce. Silver lost 24 cents to $16.67 per ounce. Copper slipped 2 cents to $2.53 per pound.
The euro slipped to $1.1101 from $1.1150 on Wednesday. The dollar strengthened to 111.49 yen from 111.11 yen.
Major stock indexes overseas closed lower.
In Europe, Germany's DAX was down 0.3 percent, while France's CAC 40 was 0.5 percent lower. The FTSE 100 index of leading British shares was down 0.9 percent. In Asia, Japan's benchmark Nikkei 225 index slid 1.3 percent. South Korea's Kospi lost 0.3 percent. Hong Kong's Hang Seng shed 0.6 percent.