The S&P 500 ended marginally higher on Friday and closed out its fastest-climbing week since 2013, although it surrendered most of its earlier gain for the day after a U.S. grand jury indicted several Russians for meddling in the 2016 presidential election.

U.S. Special Counsel Robert Mueller's office said a U.S. federal grand jury indicted 13 Russian nationals and three Russian entities accused of interfering with U.S. elections in an effort to support then-candidate Donald Trump.

The S&P 500 had been up over half a percent but lost nearly all of that after the announcement of the indictments.

“The market was looking for an excuse to roll over and Russia headlines would do it. You’ve had such a rally for the week, and people have been looking for an excuse to take profits heading into the weekend,” said Dennis Dick, a proprietary trader at Bright Trading LLC in Las Vegas.

A market correction sparked by inflation concerns earlier in February raised fears that a nine-year bull market had ended, but data on consumer prices and retail sales this week left investors less worried.

Investors on Friday snapped up shares of Johnson & Johnson , Abbvie and Pfizer, all up more than 1.4 percent and supporting the S&P 500 more than any other stocks.

A strong fourth-quarter reporting season and deep corporate tax cuts introduced this year have led analysts to increase their estimates for 2018 S&P 500 earnings growth to 19 percent from 12 percent in early January.

"The fundamental story has not changed," said Ben Phillips, Chief Investment Officer of EventShares. "We really have not seen the tax reform start flowing through yet into company earnings. We think it's going to cause a second wave of earnings optimism."

The Dow Jones Industrial Average rose 0.08 percent to end at 25,219.38 points, while the S&P 500 gained 0.04 percent to 2,732.22.

The Nasdaq Composite dropped 0.23 percent to 7,239.47.

The Dow rose 4.25 percent for the week, its strongest weekly gain since November 2016.

The Nasdaq rose 5.31 percent for the week, its best week since December 2011.

The S&P 500's 4.3 percent gain for the week was its biggest weekly advance since January 2013. It remains down nearly 5 percent from its record high on January 26.

U.S. stock markets are unlikely to return to the unusually calm conditions seen last year, even though equities have already recovered more than half the ground lost in the recent selloff and traders have rapidly dialed down fear.

Economic data out on Friday painted a rosy picture. Homebuilding increased to more than a one-year high in January, boosted by strong increases in the construction of single- and multi-family housing units. A different report showed import prices jumped last month.

The CBOE volatility index, known as Wall Street's fear gauge, edged up to 19.4 but remained way off the 50-point level it hit during the peak of the sell-off.

Coca-Cola rose 0.45 percent after the company reported better-than-expected profit and sales as it sold more teas, coffees and vitamin water.

Among the big decliners was Kraft Heinz, which dropped 2.63 percent after quarterly profit and sales missed analysts' estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.43-to-1 ratio; on Nasdaq, a 1.34-to-1 ratio favored advancers.

Volume on U.S. exchanges was 7.1 billion shares, below the 8.5 billion average for the full session over the last 20 trading days. (Additional reporting by Sruthi Shankar in Bengaluru; Editing by Nick Zieminski and Susan Thomas)

© Reuters News 2018