Stocks closed mostly higher on Friday as investors digested commentary from key Federal Reserve officials while parsing through strong bank earnings and U.S. economic data.
The Dow Jones industrial average rose more than 150 points before closing about 40 points higher, with Goldman Sachs contributing the most gains. The S&P 500 ended just above breakeven, with information technology and financials leading advancers. The Nasdaq composite barely closed above the flatline, as the iShares Nasdaq Biotechnology ETF (IBB) fell more than 1.8 percent.
Traders had expected further buying ahead of the close, which didn't materialized.
Stock investors were taken for a choppy ride this week, with the Dow and S&P alternating between positive and negative sessions. The three major indexes fell this week.
Dow (blue), S&P (green) and Nasdaq (yellow) this week
"I think some of this volatility has been because the Fed is so data dependent, and that has led somewhat to this risk-on-risk-off market," said Ed Crotty, chief investment officer at Davidson Investment Advisors. He also said that, while many investors are expecting the Fed to move in December, the Fed could back off. "If the data weakens, who knows? The Fed has talked tough before and then backed off."
Fed Chair Janet Yellen said the Fed might want to let inflation run hotter for a while. She pointed out that the economy has seen an unusual tendency of weak demand against strong supply, making it reasonable "to ask whether it might be possible to reverse these adverse supply-side effects by temporarily running a 'high-pressure economy,' with robust aggregate demand and a tight labor market."
"I think the market is interpreting this as a possibility that the Fed may not raise rates in December. I don't buy it, but I think that's how the market is interpreting it," said Peter Cardillo, chief market economist at First Standard Financial.
In afternoon ET, New York Fed President William Dudley said "I would expect this year" for the Fed to raise rates, according to Dow Jones. The dollar hit its highest level of the day against a basket of currencies following Dudley's remarks.
Earlier on Friday, Boston Fed President Eric Rosengren spoke with CNBC saying his views haven't changed, but economic conditions have. He said interest rates should go up because the economy was close to reaching full employment and its 2 percent inflation target.
"We've talked about a transition from a central banks-driven market to an earnings-driven market, and that is what we're seeing here," said Bruce Bittles, chief investment strategist at Baird.
Nick Raich, CEO of The Earnings Scout, said earnings season has gotten off to a good start. Of the 34 S&P 500 companies that had reported as of Friday morning, 79 percent had beaten Wall Street estimates for earnings per share.
"It's going in the right direction; we're not decelerating in terms of growth," he said. "That's the good news. The bad news is the market is pricing that in and it might be pricing in higher growth."
"The main theme of third-quarter earnings is not going to be third-quarter earnings; it's going to be the direction of fourth-quarter estimates," Raich said.
In economic news, U.S. retail sales rose 0.6 percent in September, matching expectations. Meanwhile, the Labor Department said its producer price index for final demand increased 0.3 percent after being unchanged in August.
"Core sales grew by just 2.5% y/o/y, the slowest pace of gain since November 2015," said Peter Boockvar, chief market analyst at The Lindsey Group, in a note. "We know the consumer is the only thing keeping the US economy out of recession and we will likely get a trimming to Q3 GDP estimates today on the core retail sales miss."
Other data released Friday included business inventories, which rose 0.2 percent in August. Meanwhile, October consumer sentiment came in at 87.9, well below an estimate of 92, as concerns over the U.S. presidential election weighed.
"Whether we like it or not, ... the market likes it when there is very little change in government," said Isaac Cohen, vice president at Forest Hills Financial Group. "If we get Hillary Clinton in the White House and a Republican House of Representatives, that would be good for stocks."
Investors have been heavily scrutinizing U.S. economic data recently, trying to gauge the likelihood that the Fed raises interest rates later this year. According to the CME Group's FedWatch tool, market expectations for a December rate hike are more than 60 percent.
Overseas, European stocks traded higher as sentiment shifted following the release of better-than-expected inflation data from China, which helped ease concerns over global growth prospects.
"This stamps that the deflation period may have come to an end. Rising prices for both consumer and producers was something that the PBOC was trying to trigger for a while because it shows that the economy is fostering," said Naeem Aslam, chief market analyst at Think Markets.
Sovereign bond yields whipsawed on Friday, with the U.S. two-year note yield at 0.835 percent and the benchmark 10-year yield at 1.789 percent, after trading mostly higher earlier in the session.
Meanwhile, in oil markets, U.S. crude settled 0.18 percent lower at $50.35 per barrel as abundant crude supplies outweighed tighter U.S. fuel inventories and OPEC's plans to cut output.
The gained 0.43 points, or 0.02 percent, to end at 2,132.98, with financials leading five sectors higher and health care lagging.
The Nasdaq rose 0.83 points, or 0.02 percent, end at 5,222.
Advancers and decliners were about even at the New York Stock Exchange, with an exchange volume of 791.70 million and a composite volume of 3.124 billion at the close.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 16.12.
Gold futures for December delivery fell $2.10 to settle at $1,255.50 per ounce.
High-frequency trading accounted for 52 percent of October's daily trading volume of about 6.43 billion shares, according to TABB Group. During the peak levels of high-frequency trading in 2009, about 61 percent of 9.8 billion of average daily shares traded were executed by high-frequency traders.
CORRECTION: This story has been updated to reflect that October consumer sentiment came in at 87.9.
— CNBC's Jeff Cox and Reuters contributed to this report.
On tap this week:
*Planner subject to change.
9 p.m.: Minneapolis Fed President Neel Kashkari speaks at a town hall on "Ending too big to fail," the role of the Federal Reserve and other topics
*Planner subject to change. All times Eastern.