NEW YORK (AP) --- Stock indexes inched ahead to record highs Friday, barely, after a late-afternoon push erased losses from earlier in the day. It caps the fourth straight week of gains for the Standard & Poor's 500 index, its longest such streak since July.
Reports through the week showed that the economy is improving and corporate profits are growing more quickly than analysts expected. The encouraging data, along with hopes for lower taxes and other business-friendly policies from Washington, pushed the S&P 500 to a 1.5 percent rise last week, its best weekly performance since the first week of January.
The S&P 500 rose 3.94 points Friday, or 0.2 percent, to 2,351.16. The Dow Jones industrial average edged up by 4.28 points, less than 0.1 percent, to 20,624.05 and also set a record. The Nasdaq rose 23.68, or 0.4 percent, to 5,838.58, its own all-time high.
Slightly more stocks fell than rose on the New York Stock Exchange.
The last two days have been lackluster for stocks, with the S&P 500 dipping on Thursday, in comparison to the strong run they had been on. That slowdown was more a result of investors looking to cash in some profits than on any fear or need to get out of the market, said JJ Kinahan, chief market strategist at TD Ameritrade.
"People don't want unnecessary risk heading into a three-day weekend," he said. "This is more about taking off risk than about aggressive selling."
U.S. markets will be closed Monday for Presidents Day.
Kinahan pointed to relative calmness in the markets for the VIX index, which measures expectations for upcoming volatility in the S&P 500, and for gold, a traditional landing spot when investors are nervous.
Kraft Heinz surged to the biggest gain in the S&P 500 after it made an offer to buy European consumer goods giant Unilever. Unilever rejected the bid, which offered 18 percent more than where Unilever's shares closed on Thursday, and called it too low.
Kraft Heinz, which is behind the Lunchables and Oscar Mayer brands, jumped $9.37, or 10.7 percent, to $96.65. U.S.-listed shares of Unilever, which sells Breyers ice cream and Dove soap, surged $5.96, or 14 percent, to $48.53.
Campbell Soup had the biggest drop in the S&P 500 after the company surprised analysts by reporting weaker revenue in its latest quarter than a year earlier. Its earnings were better than Wall Street had forecast, however. Shares fell $4.07, or 6.5 percent, to $58.48.
General Mills fell $2.31, or 3.8 percent, to $59.23 after it warned of tougher times ahead. It said weaker-than-expected U.S. sales of yogurt and soup pushed it to cut its sales and profit forecast for its fiscal year, which ends in May.
Treasury yields gave back some of the gains they made earlier in the week. The yield on the 10-year Treasury note fell to 2.42 percent from 2.45 percent late Thursday. The two-year yield dipped to 1.19 percent from 1.21 percent, and the 30-year Treasury yield sank to 3.02 percent from 3.05 percent.
In European stock markets, the French CAC 40 index fell 0.7 percent, Germany's DAX was virtually flat and the U.K. FTSE 100 rose 0.3 percent. In Asia, Japan's Nikkei 225 index fell 0.6 percent, the Hang Seng in Hong Kong fell 0.3 percent and South Korea's Kospi index slipped 0.1 percent.
The dollar fell to 112.93 Japanese yen from 113.11 yen late Thursday. The euro fell to $1.0607 from $1.0677, and the British pound fell to $1.2416 from $1.2497.
Benchmark U.S. crude oil rose 4 cents to settle at $53.40 a barrel. Brent crude, the international standard, fell 16 cents to close at $55.81 a barrel. Natural gas fell 2 cents to $2.83 per 1,000 cubic feet, wholesale gasoline fell nearly 1 cent to $1.52 per gallon and heating oil rose a fraction of a penny to $1.64 per gallon.
Gold fell $2.50 to settle at $1,239.10 per ounce, silver fell 4 cents to $18.03 per ounce and copper fell 1 cent to $2.71 per pound.