What happened

Office Depot (ODP 1.73%) trounced the market last month, with the stock gaining 33.5% compared to a 3% increase in the S&P 500, according to data provided by S&P Global Market Intelligence.

The rally erased only a portion of the stock's recent losses, though, and shares are still in negative territory so far in 2018.

^SPX Chart

^SPX data by YCharts.

So what

August's spike came in response to surprisingly strong second-quarter results. Sales rose 11% to $2.6 billion thanks to improving demand trends in each of the retailer's three operating divisions. Its service segment was a standout performer, more than doubling to $295 million and reaching 16% of the broader business.

Blue and orange rising stock chart

Image source: Getty Images.

The second-quarter report contained some bad news for investors, too. Sales at existing retailing locations fell 2% thanks to declining customer traffic and reduced spending per visit, even though that result represented a 2-percentage-point improvement from Q1. Adjusted operating margin fell to 2.4% of sales from 2.7% a year ago, too.

Now what

CEO Gary Smith and his executive team affirmed a full-year outlook that calls for sales of around $10.8 billion and adjusted operating income of $360 million. Both figures were lifted in early May, and executives now have even more confidence that they'll reach those goals after retailing trends improved over the last few months.