Stocks inched past more milestones Friday, delivering the third consecutive record-high close for the Standard & Poor’s 500 index and a new high for the Dow Jones industrial average.

The S&P 500 is now up 6.2 percent for the year, while the Dow is up 2.2 percent. The major stock indexes all finished ahead for the week.

On a light day for U.S. economic data, investors mostly focused on companies in the news, such as CarMax, Oracle and Darden Restaurants. They also kept an eye on the developing conflict in Iraq, which pushed oil prices near a nine-month high.

Despite the record-setting moves, it was largely a static day for the stock indexes.

“Generally speaking, any big movements will come when we start earnings season in a couple of weeks,” said Drew Wilson, equity analyst with Fenimore Asset Management. “Until then, it’ll be hand-to-hand combat in the indexes.”

The S&P 500, Dow and Nasdaq composite started off in the green during premarket trading and remained mostly higher all day.

By the last hour of trading, the Dow Jones industrial average was on track for a record close. More than half of the 30 companies in the index rose, raising the possibility that the Dow might breach the 17,000 mark soon.

“If the economy continues to grow the way it’s growing and the Federal Reserve remains as supportive as it is, I think we have more highs to achieve before the year is out,” said Krishna Memani, chief investment officer at OppenheimerFunds.

All told, the S&P 500 index rose 3.39 points, or 0.2 percent, to 1,962.87. That’s slightly above the prior day’s record close of 1,959.48. On Wednesday, the index notched another high at 1,956.98. It has risen five out of the last six weeks.

The Dow added 25.62 points, or 0.2 percent, to 16,947.08.

The Dow’s previous high was June 10, when it closed at 16,945.92.

The Nasdaq composite gained 8.71 points, or 0.2 percent, to 4,368.04. The Nasdaq is still well below its dot-com era peak of just over 5,000.

U.S. government bonds prices were little changed. The yield on the 10-year Treasury note slipped to 2.61 percent from 2.62 percent late Thursday.

The market has been mostly registering small moves, as stocks hover in record territory while questions persist over the resiliency of the U.S. economy and unrest in Iraq and elsewhere.

“It clearly was a driver that is definitely helping the market,” Memani said. “The markets would have reacted even better than they have so far if the Iraq issue wasn’t hanging over the market.”

Absent any major geopolitical developments, investors will likely focus next week on the latest batch of housing data.

“Housing has been, as of late, a less-than-stellar horse in the recovery,” Wilson said. “A lot of people will parse the housing data pretty carefully and that could move the markets.”

CarMax was among the stocks driving market action Friday.

The used car dealership operator reported a 16 percent jump in first-quarter earnings. The stock gained $7.47, or 16.5 percent, to $52.75. Shares in rival AutoNation rose $2.91, or 5.1 percent, to $59.42.

A group of drugmakers also helped move the S&P 500 higher. Eli Lilly added $2.18, or 3.6 percent, to $62.03, while Alexion Pharmaceuticals rose $5.77, or 3.6 percent, to $165.46. Amgen added $3.12, or 2.6 percent, to $120.97.

Five of the 10 sectors in the S&P 500 index posted gains, led by energy stocks. Utilities fell the most.

Among the big decliners Friday was RadioShack, which plunged 10.4 percent, falling below $1 per share for the first time. The electronics retailer has struggled to turn around its business, hurt by declining revenue. The stock shed 11 cents to 92 cents.