Walmart (NYSE:WMT) is set to post its second-quarter 2018 earnings results on Thursday, Aug. 16. The retailing titan has modestly outperformed the market since its last report back in May, but the stock is trailing broader indexes over the past 1-year and 3-year time frames.

Against that shaky backdrop, investors this week will be looking for signs of strength in Walmart's customer traffic metrics, both in physical stores and in its surging e-commerce channel. But the retailer has a tough balance to strike as it invests aggressively in growth initiatives that might never pay off.

Let's take a closer look.

Two women share a secret while shopping.

Image source: Getty Images.

Protecting market share

Walmart logged steady growth where it counted last quarter. Sales within its U.S. store base improved 2% as customer traffic continued to expand. That kept the retailer on track to meet management's broader goal of at least 2% comparable-store sales growth this year.

It wasn't all good news, though. For one thing, Walmart's customer traffic gains trailed rival Target (NYSE:TGT), which posted a 3.7% spike to mark its best quarterly performance on that metric in over a decade. Meanwhile, Walmart's e-commerce sales were a bit disappointing. The 33% first-quarter increase in online sales fell below the business's 40% growth goal for the year. Given those mixed results, investors will be watching growth metrics for any signs of a slowdown or market-share losses to competitors like Target.

Trading profitability for growth

Walmart has warned investors to expect slightly lower profitability as it transitions toward multichannel retailing. The company isn't alone in this challenge. Target, for example, is predicting lower operating margins over the long term under this new sales model, which demands a robust sales and fulfillment infrastructure for both online sales and physical sales in retail locations across the country.

WMT Operating Margin (TTM) Chart

WMT operating margin data by YCharts. TTM = trailing 12 months.

Walmart's operating income fell by 10% in fiscal 2018, which helped push its operating margin rate down to roughly 4% of sales. The decline slowed in the first quarter, though, which supports management's forecast that profitability will stabilize over the next few quarters. Shareholders will want to see more progress toward that goal on Thursday.

Follow the cash

A major benefit of Walmart's operating model is that the financial strength it provides through sheer scale and size is just not achievable by any of its peers. The retailing giant generated $28 billion of operating cash flow last year, and even after shelling out $10 billion on capital expenditures, it still had over $18 billion of free cash flow left over.

Yet that cash isn't particularly useful if management can't find efficient ways to spend it. Lately the retailer has been pouring resources into bulking up its digital sales reach, including a $16 billion acquisition of India-based Flipkart, its biggest purchase yet. The move reflects what CEO Doug McMillon called management's "strong sense of urgency" in transforming the business to better compete in a multichannel sales environment.

But buying an as-yet unprofitable e-commerce businesses like Flipkart is risky, and so is the idea of going up against streaming video giant Netflix in a battle for TV subscribers. Moves like these reflect the fact that Walmart currently has lots of resources available, but limited avenues to put that cash to work in what has been its traditional strong suit, physical retailing. Thus, investors might hear more acquisition news in the coming quarters that may -- or may not -- appear to fit well within Walmart's core competencies.