NEW YORK (AP) -- Stocks closed out their strongest week in five years Friday and have now recovered more than half of the losses they suffered in a plunge at the beginning of the month.
Investors got back to buying stocks almost as quickly as they started dumping them. The gain Friday was the sixth in a row for the Standard & Poor's 500 index. A combination of cheaper prices for stocks as well as solid company profits put investors back in a buying mood.
The S&P 500, which many index funds track, has risen almost 6 percent in its current streak. Investors haven't hesitated to buy the same types of stocks that did well before the market's recent slump, including technology companies and banks.
In a typical market downturn, investors might avoid stocks that have had huge run-ups out of fear they had gotten too expensive. Instead, investors are still betting on more strength in the economy and are buying companies that tend to do better in times of faster growth.
After an unusually long period of calm, stocks plunged at the start of February as investors worried about inflation and rising interest rates. The S&P 500 fell as much as 10 percent from its latest record high reached January 26. But investors weren't scared off for long.
"Rates started to stabilize and you got some better economic data, and earnings in general have been pretty good," said Sameer Samana, global equity and technical strategist for the Wells Fargo Investment Institute.
Samana said bond and credit markets showed that the fear wasn't spreading. Companies were still able to borrow at relatively low rates, which showed lenders weren't concerned the economy was weakening.
"A lot of people probably looked at stocks vs. credit and probably thought 'if credit's not feeling it, things must not be all that bad,'" he said.
The S&P 500 gained 1.02 points, or less than 0.1 percent, at 2,732.22. That includes a gain of 4.3 percent this week, its best since January 2013.
The Dow Jones industrial average rose 19.01 points, or 0.1 percent, to 25,219.38. The Nasdaq composite lost 16.96 points, or 0.2 percent, to 7,239.47. The Russell 2000 index of smaller company stocks climbed 6.35 points, or 0.4 percent, to 1,543.55.
Homebuilders rose after the Commerce Department reported that construction of new homes jumped 9.7 percent in January. That was the highest level since October 2016, and permits, a sign of future construction, also climbed. NVR gained $131.23, or 4.3 percent, to $3,208.23 while D.R. Horton rose 46 cents, or 1 percent, to $45.57.
Among health care companies, drugmaker AbbVie jumped $3.70, or 3.2 percent, to $118.60 and Johnson & Johnson rose $1.92, or 1.5 percent, to $133.15.
Friday's gains didn't come without some bumps. The Dow was up 232 points at about 12:30 p.m., shortly before Special Counsel Robert Mueller announced the indictment of 13 Russians and three Russian organizations in a plot to interfere in the 2016 U.S. Presidential election. Stocks gave up their gains after that and spent the afternoon meandering between small gains and losses.
The indictment says the Russians used social media propaganda, at times helping Trump and harming the prospects of Democrat Hillary Clinton. Facebook fell $2.60, or 1.4 percent, to $117.36 and Twitter fell 55 cents, or 1.6 percent, to $33.06
Samana, of Wells Fargo, said the recovery from the recent 10 percent plunge may not be a smooth one either.
"We see another year of solid returns" for stocks, he said. "It'll just come with these bouts where people worry about rates and inflation and the end of the cycle."
Among health care companies, Johnson & Johnson gained $2.14, or 1.6 percent, to $133.37 and AbbVie jumped $3.11, or 2.7 percent, to $118.01.
Now that stocks have stopped plunging, investors are focusing on the strong results companies posted in the fourth quarter.
"Analysts continue to underestimate the pace of global growth," Credit Suisse analyst Jonathan Golub wrote in a report. "As a result, more companies are beating/hitting expectations than in any quarter in 20 years."
Since the market hit its recent low point on Feb. 8, the S&P 500 technology index is up 8.5 percent and its financial company index is up 6.7 percent. This week alone, Apple has jumped 10 percent and chipmaker Applied Materials is up 14.5 percent. Amazon, one of the best performing S&P 500 companies this year, rose 8 percent for the week.
Bond prices rose. The yield on the 10-year Treasury note fell to 2.87 percent from 2.91 percent.
U.S. crude oil picked up 34 cents to $61.68 a barrel in New York. Brent crude, used to price international oils, added 51 cents to $64.84 a barrel in London.
Natural gas rose 2 cents to $1.75 a gallon. Heating oil added 2 cents to $1.91 a gallon. Natural gas slipped 2 cents to $2.56 per 1,000 cubic feet.
Gold inched up 90 cents to $1,356.20 an ounce. Silver lost 8 cents to $16.71 an ounce. Copper stayed at $3.25 a pound.
The dollar edged up to 106.30 yen from 106.27 yen. The euro fell to $1.2413 from $1.2506.
The CAC 40 of France climbed 1.1 percent after a strong gain a day ago. Germany's DAX added 0.9 percent while the FTSE 100 in Britain gained 0.8 percent. In Japan, the Nikkei 225 index climbed 1.2 percent. Markets in China and South Korea were closed for lunar new year celebrations.