U.S. stocks closed higher on Friday amid news regarding Greece and after the release of three more economic data sets while investors' focus shifted back to the Federal Reserve. (Tweet This)
"We are accumulating data points from now until the next Fed meeting," said Mark Luschini, chief investment strategist at Janney Montgomery Scott. "I expect more volatility as we draw closer to the September meeting."
U.S. equities hit session highs less than an hour ahead of the close as news about the euro zone confirmed it agreed to launch a new bailout program for Greece. Before then, the three major indexes traded in a range similar to that of Thursday.
Stocks closed near the flatline on Thursday after giving back the bulk of their gains less than an hour ahead of the close, despite worries about China largely dissipating as investors digested a slew of economic data.
"Big picture, I think we're still contending with some of the ripple effects of of what's going on in China," said David Lefkowitz, senior equity strategist at UBS Wealth Management Americas.
China devalued its currency this week, the yuan, by over 3 percent against the greenback, taking global markets by surprise.
The major indexes managed to eke out gains for the week despite the volatility brought about by the yuan's depreciation. The Dow Jones industrial average gained 0.6 percent, while the S&P 500 rose 0.68 percent. The Nasdaq rose just 0.9 percent as biotechnology stocks fell 1.25 percent for the week.
Stock indexes this week
Friday's economic data offerings included the the U.S. Producer Price index rose 0.2 percent in July, while core PPI also ticked up 0.2 percent, both beating estimates.
"This is definitely good news," said Art Hogan, chief market strategist at Wunderlich Securities. "We're in desperate need of a modest increase in inflation."
Hogan added this piece of data also gives the Fed more ammunition to justify an increase in interest rates.
"For long-term investors, I don't care [when in 2015] they raise. I just want them to do it," said Maris Ogg, president at Tower Bridge Advisors, adding that the first increase needs to happen this year since 2016 is an election year.
U.S. industrial production for July shot up 0.6 percent, the Fed said, above the expected 0.3 percent gain as auto production surged.
"Bottom line, outside of the strong auto sector ... production was little changed m/o/m and is up just .8% y/o/y reflecting still the stronger US dollar, weakness in overseas economies and the crash in oil and industrial metals prices impacting that entire space," Peter Boockvar, chief market analyst at The Lindsey Group, said in a note.