A late wave of buying helped nudge U.S. stock indexes slightly higher Friday after a day of mostly listless trading.
Banks and healthcare stocks climbed the most as investors priced in an increasing likelihood that interest rates will rise in the coming months.
Federal Reserve Chairwoman Janet L. Yellen helped stoke those expectations in a speech in which she said an improving job market and rising inflation probably would 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%, to 21,005.71. The Standard & Poor's 500 index rose 1.20 points, or 0.1%, to 2,383.12. The Nasdaq composite index rose 9.53 points, or 0.2%, to 5,870.75. Small-company stocks fell. The Russell 2000 index slipped 1.54 points, or 0.1%, to 1,394.13.
Before Yellen's speech, investors' expectations of a rate hike this month already had been building in recent days as remarks by other Fed officials signaled that 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 that 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 rose 2% to $56.24, and Signature Bank rose 1.7% 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%.
Wall Street's slight gains on Friday left the stock market hovering near its latest record highs set 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% 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 2.4% to $46.82. Alaska Air Group advanced 2.7% to $98.94. United Continental went up 3.2% to $75.59.
Disappointing company earnings and outlooks pulled down several stocks.
Costco fell 4.3% to $170.26. Firearms manufacturer American Outdoor Brands, formerly called Smith & Wesson, declined 2.8% to $18.83.
Revlon slid 4.1% to $32.65, and L Brands, the parent of Victoria's Secret, fell 2% to $52.34.
Several retailers closed lower. Macy's declined the most among stocks in the S&P 500, skidding 4.4% to $31.77.
Nutanix dived 26.1% to $23 after the provider of enterprise cloud platform services gave a forecast for the third quarter that was worse than expected.
Big Lots bucked the trend, climbing 3.8% to $54.23 after the discount retailer reported a larger profit than analysts expected.
Major indexes in Europe were mixed. Germany's DAX fell 0.3%, while France's CAC 40 rose 0.6%. Britain's FTSE slipped 0.1%. Earlier in Asia, Japan's Nikkei 225 index fell 0.5% and South Korea's Kospi sank 1.1%. Hong Kong's Hang Seng index lost 0.7%.
Energy futures rose. Benchmark U.S. crude climbed 72 cents, or 1.4%, to $53.33 a barrel. Brent crude, used to price international oils, rose 82 cents, or 1.5%, to $55.90 a barrel. Wholesale gasoline rose a penny to $1.65 a gallon. Heating oil rose a penny to $1.59 a gallon. Natural gas rose 2 cents to $2.83 per 1,000 cubic feet.
The dollar fell to 114.04 yen from 114.51 yen. The euro rose to $1.0599 from $1.0502.
Gold fell $6.40 to $1,226.50 an ounce. Silver fell a penny to $17.70 an ounce. Copper rose a penny to $2.69 a pound.
3 p.m.: This article was updated with closing prices, context and analyst comments.
8 a.m.: This article was updated with more recent market information.