For the week, the Dow Jones industrial average was down 0.4 percent, the Standard & Poor's 500 index was down 1.4 percent and the Nasdaq composite index was down 2.9 percent. Pictured: The New York Stock Exchange building in New York City. Reuters

By Caroline Valetkevitch

NEW YORK (Reuters) -- The S&P 500 erased an early Fed-driven rally to close down slightly on Friday, as a selloff in biotechs offset gains in banking shares.

The Nasdaq fell 1 percent, while the Nasdaq Biotech Index tumbled 5.1 percent and retested its low from August, when it entered bear market territory.

The Dow ended solidly in positive territory, helped by shares of Nike, which hit a record high after its profit topped expectations on strong China growth. The stock, up 8.9 percent at $125, gave the biggest boost to the Dow and the S&P 500.

The market started the day higher after Federal Reserve Chair Janet Yellen late Thursday said she and other Fed policymakers do not expect recent economic and financial market turmoil to significantly alter the U.S. central bank's policy, easing concerns about the world's economic health. She said she expects interest rates to be raised this year.

The declines in the biotech index extended this week's drop to 13 percent, its biggest weekly decline in seven years. On Monday, U.S. Democratic presidential candidate Hillary Clinton said she would announce a plan to stop "price gouging" for specialty drugs, sparking a drop in the shares.

The S&P 500 health care index was down 2.7 percent, leading the decline in the S&P 500 while the S&P financial index was up 1.5 percent.

"Biotechs had been an area that had been doing really well so it could be as the market has gotten worse that people are selling stuff that's less painful to sell. Valuations were pretty stretched," said Eric Kuby, chief investment officer at North Star Investment Management Corp. in Chicago.

The Dow Jones industrial average rose 113.35 points, or 0.7 percent, to 16,314.67, the S&P 500 lost 0.9 points, or 0.05 percent, to 1,931.34 and the Nasdaq Composite dropped 47.98 points, or 1.01 percent, to 4,686.50.

Markets have been skittish since last Thursday, when Yellen cited concerns about slowing global growth as a key reason for holding off from a much-anticipated rate hike.

For the week, the Dow was down 0.4 percent, the S&P 500 was down 1.4 percent and the Nasdaq was down 2.9 percent.

Declining issues outnumbered advancing ones on the NYSE by 1,587 to 1,459, for a 1.09-to-1 ratio on the downside; on the Nasdaq, 1,907 issues fell and 920 advanced for a 2.07-to-1 ratio favoring decliners.

The S&P 500 posted six new 52-week highs and 17 new lows; the Nasdaq recorded 41 new highs and 179 new lows.

About 7.2 billion shares changed hands on U.S. exchanges, compared with the 7.4 billion daily average for the past 20 trading days, according to Thomson Reuters data.

(Additional reporting by Tanya Agrawal in Bengaluru, additional reporting by Abhiram Nandakumar; Editing by Savio D'Souza and James Dalgleish)