(AP) -- Investors shrugged off the potential for a federal government shutdown Friday, driving U.S. stocks higher and setting new milestones for several of the indexes.
The Standard & Poor's 500 index, Nasdaq composite and Russell 2000 index of smaller-company stocks finished at record highs as the market bounced back from modest losses a day earlier. The S&P 500 has now posted a weekly gain in nine of the last 10 weeks.
Retailers, banks and consumer goods companies accounted for much of the latest gains. Energy stocks fell along with crude oil prices. Utilities also declined as bond yields edged up to their highest level in more than three years.
The market rally suggested that the possibility of a federal government shutdown this weekend wasn't worrying traders.
"Looking back to some of the previous shutdowns, they weren't terribly extended in nature and didn't cause a lot of disruption by the time everything was done," said Tim Dreiling, regional investment director at U.S. Bank Private Wealth Management. "I don't think it's going to disrupt growth or make much of an impact on GDP, for example."
The S&P 500 index rose 12.27 points, or 0.4 percent, to 2,810.30. The Dow Jones industrial average gained 53.91 points, or 0.2 percent, to 26,071.72. The average hit a new high on Wednesday.
The Nasdaq added 40.33 points, or 0.6 percent, to 7,336.38. The Russell 2000 index of smaller-company stocks picked up 20.90 points, or 1.3 percent, to 1,597.63.
Bond prices fell. The yield on the 10-year Treasury rose to 2.66 percent from 2.63 percent late Thursday. That's the highest level since July 2014. The increase in yields weighed on bond-proxy stocks, such as utilities. Exelon declined 62 cents, or 1.6 percent, to $37.97.
Despite an eleventh-hour effort to reach an agreement, Republicans and Democrats appeared no closer to averting a government shutdown before a midnight Friday deadline. After an afternoon meeting with President Donald Trump, Senate Democratic leader Chuck Schumer said the discussions would continue after having made "some progress."
U.S. House lawmakers voted late Thursday for a stopgap funding bill to keep federal agency doors open until mid-February, but Senate Democrats and some Republicans threatened to block it. Democrats want the bill to include protections for younger immigrants who were brought to the U.S. illegally as children.
Investors have driven stock indexes higher on optimism over the global economic outlook and corporate earnings, and the possibility of a federal government shutdown did not dim that enthusiasm Friday.
Investors bid up shares in clothing makers, restaurant chains, department stores and other consumer-focused companies. Toy maker Mattel led the pack, climbing 91 cents, or 6 percent, to $16.14.
They also drove up tobacco manufacturers, food and beverage makers, and other consumer products companies. Philip Morris International picked up $3.85, or 3.7 percent, to $108.92. Campbell Soup added $1.14, or 2.5 percent, to $47.39.
Banks and other financial stocks also rose. Synchrony Financial gained $1.17, or 3.1 percent, to $38.47.
Lowe's rose 3.5 percent after the home-improvement supply retailer named three new directors. The stock added $3.59 to $104.95.
Some big companies missed out on the broader market gains Friday.
IBM slumped 4 percent despite a solid fourth-quarter report. The technology and consulting company was the biggest decliner in the Dow. The stock slid $6.75 to $162.37.
American Express fell 1.8 percent after the credit card issuer suspended its share buy-back program for six months following a big one-time tax charge. The stock shed $1.83 to $98.03.
Oil futures closed lower after the International Energy Agency said U.S. oil production would rise sharply this year. Benchmark U.S. crude lost 58 cents, or 0.9 percent, to settle at $63.37 a barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, fell 70 cents, or 1 percent, to close at $68.61 a barrel.
The decline in oil prices weighed on energy sector stocks. Range Resources slid 39 cents, or 2.4 percent, to $16.08.
In other energy futures trading, wholesale gasoline fell 2 cents to $1.86 a gallon. Heating oil was little changed at $2.06 a gallon. Natural gas also closed essentially flat at $3.19 per 1,000 cubic feet.
Gold rose $5.90 to $1,333.10 an ounce. Silver added 8 cents to $17.04 an ounce. Copper slipped 1 cent to $3.19 a pound.
The dollar fell to 110.60 yen from 110.98 yen on Thursday. The euro weakened to $1.2234 from $1.2242.
The price of bitcoin edged up 1.4 percent to $11,413, according to the tracking site CoinDesk. Bitcoin futures on the Cboe Futures Exchange declined 3.1 percent to settle at $11,400. The futures allow investors to make bets on the future price of the digital currency.
Major stock indexes in Europe notched gains Friday. Germany's DAX rose 1.2 percent and France's CAC 40 added 0.6 percent. Britain's FTSE 100 gained 0.4 percent. In Asia, Japan's benchmark Nikkei 225 edged up 0.2 percent, while South Korea's Kospi gained 0.2 percent. Hong Kong's Hang Seng ended 0.4 percent higher.