NEW YORK (MarketWatch) — U.S. stocks saw modest gains Friday, pushing the S&P 500 and Dow industrials to the latest in a string of record closes and lifting the Nasdaq Composite to its strongest finish in 14 years.

“Well, the trend is your friend and with the Fed reiterating their dovish stance the follow through has propelled global equities to new highs. However, lingering in the background is steadily rising oil prices which will impact growth in time and markets will soon start to price this in,” said Mike McCudden, head of derivatives at stockbroker Interactive Investor, in a note.

The session was light on economic releases. Total volume on all stock exchanges was the largest since April 15, although the threat of increased volatility due to quadruple witching, which refers to stock index futures, individual stock futures, stock index options and individual stock options all expiring, didn’t materialize.

CarMax Inc. KMX, +0.07% led gainers in the S&P 500, surging more than 16% after upbeat results. Software maker Oracle Corp. ORCL, -0.71% was among losers, slipping 1.7% after a disappointing earnings report.

The S&P 500 SPX, -1.11% rose 3.39 points, or 0.2%, to close at 1,962.87, bringing its win streak to six days and notching a record close for the third day in a row and for the 22nd time this year. The index rose 1.4% for the week, its biggest weekly percentage gain since April 17.

The Dow Jones Industrial Average DJIA, -0.87% gained 25.62 points, or 0.2%, to close at 16,947.08, also setting a record high and extending its win streak to six sessions — the longest since December. The index gained a little more than 1% on the week.

Friday’s close was the index’s 11th closing record of the year. It also scored an all-time intraday high above 16,978, eclipsing its prior intraday record hit June 9.

The Nasdaq Composite COMP, -1.07% rose 8.71 points, or 0.2%,to end at 4,368.04, its highest finish since April 2000. The tech-heavy index saw a 1.3% weekly rise.

Quadruple witching may boost volume and volatility on Friday. Women dressed as witches are shown in this file photo. g-a-m

Friday’s tone was set on Wednesday, when investors cheered dovish comments from Federal Reserve chief Janet Yellen.

“The supportive monetary policy of the Federal Reserve which was more dovish than the market had been anticipating has pulled the dollar lower and pushed equity markets higher,” said Richard Perry, market analyst at Hantec Markets, in a note.

“However, this positivity is countered by the tensions in Iraq,” which led President Obama on Thursday to order up to 300 members of U.S. special-operations forces to that country, Perry said. “Upside is likely to continue to be slow going whilst this remains the case,” the analyst said.

U.S.-listed shares of Shire PLC US:SHPG UK:SHP leapt more than 16% after the Dublin-based drug maker rejected a £27.2 billion ($46.35 billion) takeover bid from Illinois-based AbbVie Inc. ABBV, +0.53% . AbbVie fell 1.6%. Read more in MarketWatch’s Movers & Shakers column.

In other markets, Asian stocks finished mixed, and European equities ended marginally lower. Gold futures rose, trading above the key level of $1,300, and the U.S. oil benchmark finished at a nine-month high.

More must-reads from MarketWatch:

Solar energy can’t kill old-school electric utilities

Cruise lines with the best — and worst — tipping policies

Retirement is bad for your health — and your wealth