A late wave of buying helped nudge U.S. stock indexes slightly higher Friday after a day of mostly listless trading.
Banks and health care stocks climbed the most as investors priced in an increasing likelihood that interest rates will rise in the coming months.
Federal Reserve Chair Janet Yellen helped stoke those expectations in a speech in which she said an improving job market and rising inflation would likely prompt the central bank to increase borrowing costs.
"The real takeaway here is if the Fed is willing to start moving, they see the economy as not only doing better but likely to do better going forward," said Brad McMillan, chief investment officer at Commonwealth Financial Network. "The Fed is notorious for waiting until the evidence of growth is absolutely undeniable."
The Dow Jones industrial average rose 2.74 points, or 0.01 percent, to 21,005.71. The Standard & Poor's 500 index gained 1.20 points, or 0.1 percent, to 2,383.12. The Nasdaq composite index added 9.53 points, or 0.2 percent, to 5,870.75. Small-company stocks fell. The Russell 2000 index slipped 1.54 points, or 0.1 percent, to 1,394.13.
Speaking in Chicago on the Fed's economic outlook Friday, Yellen said the Fed will likely resume raising interest rates later this month to reflect a strengthening job market and inflation edging toward the central bank's 2 percent target rate.
Yellen added that the central bank expects steady economic improvement to justify additional rate increases. While not specifying how many rate hikes could occur this year, Yellen noted that Fed officials in December had estimated that there would be three this year.
Investors' expectations of a rate hike this month had been building in recent days as remarks by other Fed officials signaled the central bank is ready to resume raising rates as soon as its next two-day meeting of policymakers on March 14-15.
That's one reason the major indexes moved little before and after Yellen's speech.
Still, the increased likelihood of higher interest rates gave several stocks a modest lift, including banks, which stand to make healthier profits from lending as rates rise. Bank of the Ozarks added $1.09, or 2 percent, to $56.24, while Signature Bank rose $2.79, or 1.7 percent, to $162.24.
Not faring as well were real estate, utilities and phone company stocks, which tend to lose favor among yield-seeking investors when interest rates rise.
"If yields are going up you don't need to buy those stocks to get your yield, you just buy 10-Year Treasury notes," said John Canally, chief economic strategist for LPL Financial.
Bond prices were little changed after pulling back from an early climb. The 10-year Treasury yield held steady at 2.48 percent.
Wall Street's slight gains on Friday left the stock market hovering near its latest record highs set on Wednesday.
Stronger-than-expected earnings from companies, continued improvement in the U.S. economy and expectations for business-friendly policies from Washington have helped propel the market this year to new highs. Should investors be nervous about a pullback?
"In the very short term there is some risk of a pullback," said Randy Frederick, vice president of trading and derivatives at the Schwab Center for Financial Research. "I wouldn't say it's likely to approach anything close to a correction, or a 10 percent pullback. Long-term, we continue to think we're solidly in a bull market."
Airlines were among the stocks that notched solid gains Friday.
American Airlines Group rose $1.10, or 2.4 percent, to $46.82, while Alaska Air Group added $2.58, or 2.7 percent, to $98.94. United Continental picked up $2.31, or 3.2 percent, to $75.59.
Disappointing company earnings and outlooks pulled down several stocks.
Costco fell $7.72, or 4.3 percent, to $170.26. Firearms manufacturer American Outdoor Brands, formerly called Smith & Wesson, declined 55 cents, or 2.8 percent, to $18.83.
Revlon slid $1.40, or 4.1 percent, to $32.65, while L Brands, the parent of Victoria's Secret, fell $1.07, or 2 percent, to $52.34.
Macy's also fell sharply, one of several retailers that closed lower Friday. The department store chain declined the most among stocks in the S&P 500, skidding $1.45, or 4.4 percent, to $31.77.
Big Lots bucked the trend, climbing 3.8 percent after the discount retailer reported a larger profit than analysts expected. The stock added $1.98 to $54.23.
Major indexes in Europe were mixed. Germany's DAX fell 0.3 percent, while France's CAC 40 rose 0.6 percent. Britain's FTSE slipped 0.1 percent. Earlier in Asia, Japan's Nikkei 225 index fell 0.5 percent, while South Korea's Kospi sank 1.1 percent. Hong Kong's Hang Seng index lost 0.7 percent.
Energy futures rose. Benchmark U.S. crude gained 72 cents, or 1.4 percent, to close at $53.33 a barrel in New York. Brent crude, used to price international oils, added 82 cents, or 1.5 percent, to close at $55.90 a barrel in London. Wholesale gasoline picked up a penny to close at $1.65 a gallon. Heating oil added a penny to close at $1.59 a gallon. Natural gas rose 2 cents to close at $2.83 per 1,000 cubic feet.
The dollar fell to 114.04 yen from 114.51 yen on Thursday. The euro rose to $1.0599 from $1.0502.
Gold fell $6.40 to $1,226.50 an ounce. Silver slipped a penny to $17.70 an ounce. Copper rose a penny to $2.69 a pound.