Week could end well for stocks if oil holds $30

Consumer inflation data are the big headline for markets Friday, as stocks gear up for what could be their best weekly performance since November.

Stocks gave back some gains Thursday, but the S&P 500 was still up 2.8 percent for the week to date. The index fell 8 points to 1,917.

"It's not unusual to have three robust days like we just had and to have some retracement," said Art Hogan, chief market strategist at Wunderlich Securities. "It's a market that certainly has taken on a better tone over the last couple days, and to have a sideways-to-down day was healthy."

Traders work on the floor of the New York Stock Exchange.
Getty Images
Traders work on the floor of the New York Stock Exchange.

Read MoreDumpster-diving investors are doing well in 2016

Consumer price inflation data is expected at 8:30 a.m. ET and it's projected to show a 0.1 percent decline but a 0.2 percent gain when looking at the CPI, minus food and energy. There are also a few earnings including Deere, VF Corp, Allianz, Pinnacle West and Cabot Oil & Gas.

Oil rallied early Wednesday, helping lift stocks. When crude futures gave up gains Thursday, equities started to weaken. West Texas Intermediate rose modestly to settle at $30.77 on Thursday.

Read More House flipping: Deja vu all over again

"Energy staying north of $30 on WTI would be a positive, considering the amount we moved off the lows here. More good news than bad out of the economic data stream is a new trend for us," Hogan said. He said jobs, industrial production and retail sales all surprised higher, so a pickup in weekly wages in the CPI number would also be a positive. "What it doesn't look like is a recession, and that had been a concern."

Hogan said the next target for the S&P on the upside is 1,950, a level many technicians are watching. "A lot of people look at the same technical, key off the same thing, and they become self-fulfilling," he said.

Read More Wal-Mart results spook investors

Besides CPI, the bond market will be focused on Cleveland Fed President Loretta Mester, who is scheduled to speak on the economy and monetary policy at 8:40 a.m. ET.

Traders will also be looking overseas Friday as the European Union holds a summit that could be the make or break moment for the United Kingdom's membership in the bloc. If a deal is struck, the U.K. could put membership in the EU to a vote.