NEW YORK — Stocks gave up most of their gains to end slightly higher Friday, extending a September rally that has slowed as the month wears on.
The Dow Jones industrial tacked on 13 points, while the Standard & Poor's 500 Index edged up less than a point. Both traded close to the break-even level all day. The Dow and other major indexes logged their third-straight weekly advance.
The market started on an up note following surprisingly strong profit news late Thursday from technology leaders Oracle Corp. and Research in Motion Ltd., which makes BlackBerrys.
Technology and industrial shares were broadly higher, though energy companies were weak following a drop in crude oil prices. A decline in a measure of consumer confidence from the University of Michigan/Reuters also kept a lid on buying. Gold set another record and Treasury prices edged higher in a sign that investors remain cautious.
The Standard & Poor's 500 Index briefly edged above a technical trading threshold, but not enough to convince analysts that the market is ready to move sharply higher. Stocks have been on a nearly unbroken upward march in September, driving the S&P up 7.3 percent.
Traders watch such technical barriers closely for clues about where the market might go next. Right now the key level for the S&P 500 is 1,131, its intraday high for June 21 and the top end of its recent trading range. It barely peeked over that level Friday but failed to stay above it, a sign that the market needs more fuel in the form of good news on the economy or corporate profits before moving higher again.
Uri Landesman, president of Platinum Partners, said if the S&P can rally past 1,131, it could surge even further in the next couple of weeks. But if it cannot significantly eclipse that level and falls back below 1,115, roughly its low for the week, "we could go to 1,000 pretty fast," Landesman said.
The Dow Jones industrial average rose 13.02, or 0.1 percent, to close at 10,607.85. The Dow is up 5.9 percent in the month to date, defying skeptics who predicted a decline in September, which is historically a weak one for stocks. It has risen in seven of the past eight days.
The Standard & Poor's 500 index inched up 0.93, or 0.08 percent, to 1,125.59, and the Nasdaq composite rose 12.36, or 0.5 percent, to 2,315.61.
For the week, the Dow and S&P are both up 1.4 percent, and the Nasdaq is up 3.3 percent.
The Dow also had three straight weeks of gains in mid- to late July as many big companies delivered positive earnings surprises. However stocks spent most of August in a funk before turning higher again in September as news on the economy started to improve.
Money flowed into Treasurys again after the weak consumer sentiment reading and a report from the Labor Department showed consumer prices rose slightly in August.