U.S. stocks closed higher Friday, helped by gains in retail stocks, as investors looked to central banker comments on the trajectory of monetary policy.
The major averages ended the week with gains of more than 3 percent. The S&P 500 ended the week with gains of 3.27 percent, its best week since the one ended Dec. 19, 2014.
The Dow Jones industrial average closed about 91 points higher, off session highs of about 181 points.
"Maybe it's just squaring up going into a long holiday week and taking some gains," said Chris Gaffney, president, Everbank World Markets.
"Especially it's somewhat upsetting — the market pretty much shrugging off all the terrorism. It's a sign of the times. We know and expect there are going to be these kinds of events but they don't necessarily impact the global economy anymore unless they're significant," Gaffney said. On "interest rates, we understand the Fed's going to make a move but they're going to remain accommodative pretty much all year."
Analysts also attributed some of the late-session pullback and volatility to options expiration Friday.
The Dow closed flat for the year after briefly joining the S&P 500 and Nasdaq composite in positive territory for 2015. The S&P 500 and Nasdaq composite are up nearly 1.5 and 7.8 percent, respectively, for the year so far.
After the close Thursday, Nike increased its dividend by 14 percent, declared a 2-for-1 stock split, and announced a $12 billion stock buyback program.
Consumer discretionary rose more than 1 percent and continued to lead S&P 500 advancers despite a sharp decline in Chipotle.
Shares of Chipotle plunged 12.3 percent to its lowest in more than a year after a post on the Centers for Disease Control and Prevention website said "three more states have reported people infected with the outbreak strain of Shiga toxin-producing Escherichia coli O26 (STEC O26) since the last update."
"The epidemiologic evidence available at this time suggests that a common meal item or ingredient served at Chipotle Mexican Grill restaurants in several states is a likely source of this outbreak," the site said.
Encouraging reports from major retailers such as Ross Stores more than offset the fall in Chipotle.
The Retail ETF (XRT) gained 2 percent, or 4.2 percent for its best week in nearly 3 years as Abercrombie & Fitch surged.
"The week-over-week has really been a change in the sense of the U.S. consumer," said Art Hogan, chief market strategist at Wunderlich Securities.
Also helping gains Friday, "the falloff in energy prices has stabilized a little bit" and "that (central bank) narrative continues to play out as expected. We've got a day where we've confirmed our position about the Fed and the path of least resistance is higher," Hogan said.
Ahead of the open, European Central Bank President Mario Draghi said the ECB stands ready to "do what (it) must to raise inflation as quickly as possible" if it decides current policy isn't stimulating the sluggish euro zone economy.
Fed Vice Chairman Stanley Fischer said after the close Thursday that "some major central banks" could move away from near-zero interest rate policy "in the relatively near future."
"The market seems to be very comfortable now assuming the economy is in the right place for a liftoff," said Omar Aguilar, chief investment officer, equities, at Charles Schwab Investment Management.
New York Fed President William Dudley said the Fed still has time to decide about a December rate rise, Dow Jones reported. He added the central bank may soon reach goals needed for liftoff but timing is still data-dependent and he hopes to see evidence of rising inflation soon, the news wire reported.
Dudley also said the economy will do "okay" in 2016 and that the current economy is in "pretty good shape," while global growth is "not that strong," according to Dow Jones.
"You get a weak backdrop for global economic activity that transfers (itself to) the question of what the Fed does and lower for longer," said John Toohey, head of equities at USAA Investments, noting increasing anticipation of a much more gradual pace of rate hikes.
St. Louis Fed President James Bullard said in a Reuters report Friday the central bank will return to an era where there is more uncertainty on interest rate moves on a meeting-by-meeting basis after an initial rate hike. He added the pace of monetary policy tightening should be data-dependent.
Earlier, Dow Jones reported the policymaker said he expects inflation to rise relatively quickly into next year as long as oil prices stabilize.
"It's all about the free money," said Adam Sarhan, CEO of Sarhan Capital. "All year they've been telling us they're going to raise rates. Pay attention to what the Fed does, not what they say."
Treasury yields traded slightly higher, with the at 0.91 percent and the 10-year yield at 2.26 percent.
The U.S. dollar traded half a percent higher, with the euro lower at $1.064 and the yen flat at 122.91 yen against the greenback.
Read MoreThis is what the bond market is