Stocks posted modest losses ahead of the weekend, and ended largely flat for the week, amid surging oil prices, and as Congress seemed on track to trigger a government shutdown by failing to agree to a budget for the rest of the fiscal year.
The Dow Jones Industrial Average fell 29.44 points to close at 12,380.05. For the week, the Dow closed up 0.03 percent.
Among Dow components, Chevron was the best performer for the week, rising 1.25 percent, while Caterpillar was the worst, falling nearly 3 percent.
The S&P 500 fell 5.34 points, or 0.04 percent, to close at 1,328.17. For the week, the S&P 500 fell 0.32 percent.
Exxon was the best S&P 500 performer this week, rising 1.5 percent, while Apple was the worst performer for the week, falling nearly 3 percent.
The Nasdaq fell 15.73 points, or 0.56 percent, Friday to close at 2,780.41. For the week, the Nasdaq fell 0.33 percent.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, rose to nearly 18.
Most of the market action on Friday was in commodities as gold soared to yet another new record, closing above $1,473 an ounce. Meanwhile, the dollar sank against the euro, which rose after the European Central Bank raised a key interest rateby 0.25 percent on Thursday.
Oil prices jumped to new records amid attacks on Libyan oil fields, and the sinking dollar. London Brent crude surged above $124 a barrel, while U.S. light crude rose $2.49 to settle at $112.79 a barrel, its highest close since September 2008.
Airlines, affected by rising fuel costs, posted the biggest drop as JetBlue , United Continental and Delta Airlines each dropped.
But energy companies climbed, including Suncor Energy and Nabors Industries . Murphy Oil also gained after the firm won approval to resume drilling a deepwater well in the Gulf of Mexico. But Hercules Offshore tumbled after the oil explorer said it is under investigation by the Department of Justice and the SEC.
The budget negotiationshaven't been a huge factor in trading as "it's universally thought there is going to be a deal," said Kevin Kruszenski, head of listed trading at KeyBanc Capital Markets.
Even if no agreement was reached, "It would have to be a prolonged slowdown for the market to really react," Kruszenski said.
Of greater interest to traders is the start of earnings season, which unofficially begins next Monday when Alcoa releases results after the market closes.
"Earnings season will be kicking off here soon, and people are clearing up some positions in that respect," Kruszenski said.
About a third of the economists, fund managers and strategists who responded to a CNBC Fed surveyexpect the Fed to raise interest rates this year, twice as many who thought that would be the case last month.