U.S. stocks closed mildly lower on Friday, the final day of trade for July, as investors digested energy earnings misses and soft data that could push an initial rate hike further out. ( Tweet This )
Stocks were mixed to slightly lower in afternoon trade after earlier attempting to rally. The Nasdaq struggled to hold higher in afternoon trade as shares of major tech firms declined. The S&P 500 and Dow Jones industrial average traded lower as declines in energy stocks weighed.
"This tug of war between the data and the stock market—that's why we haven't gone anywhere," said Lance Roberts, general partner at STA Wealth Management.
However, in a month marked by volatility around Greece and China, selloff in commodities and mixed economic data that raised concerns about growth, the major U.S. averages posted weekly and monthly gains. The Nasdaq outperformed with a 2.8 percent gain for the month. The S&P 500 gained nearly 2 percent for the month, while the Dow posted a 0.40 percent gain for July but remained off 0.74 percent for 2015.
"I think that is just another example that Greece and Ebola will flare up (but) what ultimately drives stocks is earnings," said John Canally, investment strategist and economist at LPL Financial.
The energy sector fell more than 2.5 percent as the greatest laggard in the S&P 500. Exxon Mobil and Chevron plunged more than 4.5 percent each as the greatest decliners in the Dow Jones industrial average.
Crude oil futures settled down $1.40, or 2.89 percent, at $47.12 a barrel. Oil lost nearly 21 percent in July, its worst month since October 2008 during the financial crisis.
Other than the pressure from energy stocks, the major story of the day was "clearly the employment cost index and its impact on the dollar, gold, oil and Treasurys," said Peter Boockvar, chief market analyst at The Lindsey Group. "I think the stock market is struggling with continued soft economic data. Maybe it means the Fed won't raise interest rates. (But) the U.S. economy is struggling and that's not a good thing."
The employment cost index disappointed analysts with a rise of 0.2 percent, the smallest increase in 33 years and below expectations of 0.6 percent.
It's "telling us there's very little wage pressure in the U.S. economy right now. There are some FOMC members on the margin who are going to be less willing to raise rates in September," said Luke Tilley, chief economist at Willmington Trust Investment Advisors. "When we just look at the initial impact for firms, the cost of employment (was) not as much as in the first quarter."
Futures trimmed losses to trade mixed after the ECI came out at 8:30 a.m.
"What it tells us is September may not be a lock. If anything that may be a little reason why we're seeing a bit of rotation in futures here," said Art Hogan, chief market strategist at Wunderlich Securities.
The U.S. dollar more than halved losses after briefly falling more than 1 percent. The euro fell below $1.10 and the yen traded near 124 yen against the greenback.
The Federal Reserve left interest rates unchanged after the conclusion of its July meeting on Wednesday. The statement indicated a more optimistic outlook on U.S. economic growth, but second-quarter GDP missed expectations on Thursday, while first-quarter GDP was revised from negative to slightly positive.
St. Louis Fed President James Bullard said a Wall Street Journal report that the GDP data cleared worries over growth outlook and supports the case for raising rates as soon as September. Bullard is a non-voting member of the Fed.