Stocks were buoyed by positive earnings reports Thursday, with the Dow Jones Industrial Average (^DJI -0.12%) and the S&P 500 (^GSPC -0.58%) both posting robust gains.

Today's stock market

Index Percentage Change Point Change
Dow 1.58% 396.32
S&P 500 0.79% 22.33

Data source: Yahoo! Finance.

Telecommunications was the strongest sector today, with the iShares US Telecommunications ETF (IYZ -0.24%) rising 1.8%. Gold continued its downward trend that started early in the year, and the VanEck Vectors Gold Miners ETF (GDX 1.57%) dropped 2.4%. 

As quarterly reports for retailers continue to roll out, Walmart (WMT -0.32%) announced better-than-expected results on strong U.S. consumer spending. On the flip side, J.C. Penney (JCPN.Q) disappointed a market that was already pessimistic about mall-based department stores.

Column of stock prices and up arrows.

Image source: Getty Images.

Walmart reports highest U.S. sales gain in a decade

Walmart clobbered expectations for sales and profit when it reported second-quarter results, and shares climbed 9.3%. Revenue grew 3.8% to $128 billion, surpassing analyst expectations for $126 billion. Adjusted earnings per share jumped 19.4% to $1.29, while the analyst consensus was for a 13% increase.

U.S. comparable-store sales grew 4.5% excluding fuel, the strongest growth for the company in more than 10 years, with traffic increasing 2.2% and average ticket growing 2.3%. Comparable sales at Sam's Club were up 5% excluding fuel, which was the best performance in six years. International net sales jumped 4%. E-commerce sales growth rebounded to 40% from 33% last quarter.

Looking forward, Walmart boosted full-year guidance, now saying to expect net sales in constant currency to grow 2%, U.S. comps to rise 3%, and adjusted EPS of $4.90 to $5.05, well above the analyst consensus of $4.81.

Walmart's results seem to indicate that its growth strategies are working and that U.S. consumer spending is healthy, an indication that spread optimism through the market today.

Sales woes continue for J.C. Penney

J.C. Penney announced disappointing results for the second quarter and lowered guidance for the year, causing the stock plummet 27%. Total net sales decreased 7.5% to $2.76 billion and the company had an adjusted loss of $0.38 per share. Wall Street had been expecting a loss of $0.06 per share on sales of $2.86 billion.

The drop in sales was mainly due to the closure of 141 stores in fiscal 2017. The company actually had a 0.3% increase in comparable-store sales, but that is significantly less than the guidance the company gave three months ago. The comps gain in Q1 was 0.2%, which the company blamed on bad weather, but said to expect Q2 comps in the middle of the range of its annual guidance, which was flat to up 2% at that point. Profit was impacted by markdowns in order to reduce inventory, causing gross margin to fall 1.6 percentage points.

J.C. Penney lowered full-year comparable sales guidance to flat, and EPS guidance, which had been for a profit of $0.03 at the midpoint, was changed to a per-share loss of between $0.80 and $1.00, a grim enough outlook to send the stock to record lows.