NEW YORK — A late slump in health care stocks pushed the market to its third weekly loss this month.
Stocks had traded solidly higher for most of the day. Banks, insurance companies and brokerage firms climbed after Federal Reserve Chairwoman Janet L. Yellen said that policymakers would likely raise interest rates this year.
The market gave up most of its gains in the afternoon as a sell-off in drug makers led the healthcare sector lower.
The stock market has been volatile for the past six weeks on worries about the impact of slowing growth in China and other emerging markets, as well as uncertainty about the outlook for interest rates. The late sell-off Friday pushed stocks to their third losing week in the last four.
"This is a dangerous market that is still looking for direction," said Jerry Braakman, chief investment officer at First American Trust investment management firm. "Although the U.S. is continuing to improve, outside the U.S., it's just scary."
The Standard & Poor's 500 index fell 0.9 points, or less than 0.1%, to 1,931.34. The Dow Jones industrial average gained 113.35 points, or 0.7%, to 16,314.67. The Nasdaq composite fell 47.98 points, or 1%, to 4,686.50.
The S&P 500 closed down 1.4% for the week, the Dow was 0.4% lower.
Shares of drug makers began their slide Monday when Democratic presidential front-runner Hillary Rodham Clinton pledged to stop "price gouging" in the industry. The healthcare sector, a longtime favorite of investors, ended Friday with its worst weekly performance in more than four years.
Biotechnology shares in the S&P 500 plunged during the week, pushing the overall healthcare index down 5.8%, its worst week since August 2011. Vertex Pharmaceuticals, which focuses on developing drugs for cystic fibrosis and viral infections, was the biggest decliner in the index Friday, dropping $7.83, or 7%, to $103.20.
The market had started the day with solid gains as investors were encouraged by a report that showed U.S. economic growth was faster in the spring than previously estimated.
The U.S. economy expanded at an annual rate of 3.9% in the April-June quarter, up from a previous estimate of 3.7%, the Commerce Department reported. The strength came from gains in consumer spending, business investment and residential construction.
Financial companies got a boost after Yellen said late Thursday that the central bank was still likely to raise interest rates this year. She suggested global economic weakness won't be significant enough to alter the central bank's plan to raise its key short-term rate from zero by December.
Record low interest rates since the 2008 global financial crisis have been a boon for stocks, underpinning a bull market that has run for six and a half years.
The combination of higher rates and a growing economy is good for financial companies. That's because they can earn more from making loans. Citigroup rose $1.42, or 2.9%, to $50.55 and Bank of America climbed 34 cents, or 2.2%, to $15.89.
"The financials are a wonderful place to be over the next several quarters if a rate rise materializes," said Jim Russell, a portfolio manager at Bahl & Gaynor Investment Counsel.
Nike was biggest gainer Friday in the S&P 500. The stock soared $10.21, or 8.9%, to $125 after the company's earnings surpassed analyst expectations.
Volkswagen shares fell again. The company named Matthias Mueller, the head of the group's Porsche unit, to be the new chief executive. His predecessor, Martin Winterkorn, quit this week over the emissions scandal, which has tarnished the company's reputation. VW shares ended down 2.8% on Friday and dropped almost 30% for the week.
U.S. government bond prices fell. The yield on the benchmark 10-year Treasury note rose to 2.16% from 2.13% late Thursday.
The euro rose to $1.12 while the dollar edged up to 120.60 yen.
In metals trading, gold closed $8.20 lower at $1,145.60 an ounce. Silver edged lower, dropping 1.9 cents to $15.11 and copper fell 1.9 cents to $2.28 per pound.
The price of oil rose Friday as the number of rigs drilling for oil in the U.S. fell for the fourth straight week, according to a closely watched industry count. U.S. crude rose 79 cents to close at $45.70 a barrel in New York, ending a choppy week of trading up 2.3%.