Timing is everything, but it’s often said that you can’t time the market. What gives? It’s true that you can’t time the broader market because it can stay irrational longer than you can stay solvent, but by using logic and focusing on industry and consumer trends, you can at least predict how retailers will perform with at least some degree of accuracy.

With that in mind, what’s likely to be the best long-term investment: Target Corp. (TGT), Costco Wholesale Corp. (COST), or Wal-Mart Stores, Inc. (WMT)?

All numbers below as of May 15, 2015.

Target Edge

In early 2014, I wrote bearishly on Target due to the data breach and poor performance in Canada, but I repeatedly stressed that these were short-term events. In regards to the data breach, Target was steadfast in becoming the safest shopping destination when it comes to debit and credit card swipes. As far as Canada goes, it was more obvious to some analysts than it was to Target itself that Canadian stores would need to close. This was painfully apparent because it was in the process of flushing $7 billion down the drain. Canadian consumers just didn’t take to the concept. Fortunately, Target decided to cut its losses and move on. This was seen as a positive from an investor standpoint because more capital would be spent on higher growth areas, such as ecommerce. (For more, see: Credit Card Breach: How to Stay Safe.)

Many people will look at Target’s Canadian expansion and see failure. They’re right. But I also see a retailer that’s willing to take risks. Some of those risks will pay off and some will not. The intriguing aspect of this approach is that Target has proven it will cut its losses if proven incorrect and pour money into the winners. This is akin to a savvy venture capitalist, when he or she knows that the profits generated from the winners will greatly exceed the losses suffered with the bad investments.

Put simply, Target is more of a risk taker than people realize, and it’s obsessed with innovation. This is a big positive. Cartwheel (coupon clipping app) is one good example; it has already generated more than $1 billion in sales. Then there’s CityTarget, which is likely to be a wise decision since younger generations prefer urban living. TargetExpress is the retailer’s smallest store format and offers everything from grab-and-go snacks to fresh produce to a pharmacy. These will likely perform well near college campuses and areas where there are a lot of workers.

Target will not stop innovating, nor will it stop competing. It recently decided to eliminate shipping fees on orders for less than $25. This will hurt margins but potentially increase ecommerce market share vs. Amazon.com Inc. (AMZN), Wal-Mart, and to a lesser degree, Costco. (For more, see: How We'll All Be Amazon.com Customers Eventually.)

Online Presence

According to Alexa, which provides commercial web traffic data, Target.com has a global traffic ranking of 243 and a domestic traffic ranking of 45. Comparatively, Walmart.com has a global traffic ranking of 161 and a domestic traffic ranking of 33. Costco.com is well behind (late to the party) with a global traffic ranking of 666 and a domestic traffic ranking of 125. None of these retailers are close to Amazon.com, which ranks seventh globally and third domestically.

Direction is also an important factor. Over the past three months, Target’s global ranking has remained flat. On the other hand, its bounce rate has declined 10% to 26.30% (this is a positive), pageviews-per-user has increased 6.10% 5.53, and time-on-site has improved 3% to 5:09. All positives. (For related reading, see: Costco Just Extended Its Advantage Even Further.)

Wal-Mart's global ranking has declined 46 spots over the same time frame, with its bounce rate increasing 5% to 31.50%, pageviews-per-user sliding 7.21% to 5.53, and time-on-site declining 7% to 5:31. Despite the uninspiring recent performance, keep in mind that Wal-Mart generates enormous cash flow, which will allow it to allocate more capital into its ecommerce segment. It should also be noted that Wal-Mart is buying 13 of Target’s former Canadian brick-and-mortar locations, which will help increase its Canadian presence. (For related reading, see: Why Wal-Mart Needs to Expand Into Financial Services.)

Costco’s global ranking has slipped 15 spots over the past three months, but the subcategory performances haven’t moved much. Its bounce rate has declined 4% to 24.30%, pageviews-per-user has declined a miniscule 0.77% to 5.16, and time-on-site has declined 3% to 4.19. (For related reading, see: 5 Things Costco Wants You to Know.)

As far as King Amazon goes, its global ranking has declined by one spot. The bounce rate has declined 1% to 23.20%, pageviews-per-user has slipped 6.72% to 11.38 (still very high), and time-on-site has declined 9% to 10:37 (also very high).

Important Numbers

In April, Target’s overall comps improved 4.5% year over year. Wal-Mart was slightly more impressive, delivering a 5.0% improvement (4.0% without fuel). Costco’s comps improved 2%, but it would have been a 7% gain without negative impacts related to gas prices and foreign exchange, but these factors do matter. 

Now let’s take a look at some key metric comparisons:

 

1-Year Stock Performance

Yield

Short Position

Debt-to-Equity Ratio

Operational Cash Flow (ttm)

TGT

33.71%

2.58%

3.20%

0.91

$4.44 billion

WMT

2.44%

2.46%

1.30%

0.59

$25.56 billion

COST

29.48%

1.03%

1.30%

0.48

$4.36 billion

Wal-Mart has underperformed its peers, but it offers a generous yield, the short position is small (always a positive), it’s not overleveraged by any means, and operational cash flow generation is gargantuan for a retailer. Wal-Mart also held up best during the last crisis. These are all positives, but if the broader market falters again, Wal-Mart won’t be as resilient as last time. That’s because the next crisis will be accompanied by the need to pay off massive debts, which will mean massive entitlement cuts. This will hurt Wal-Mart’s customer demographic and lead to reduced spending at its stores and website. (For more, see: How Wal-Mart Makes its Money.)

Before moving to Target, let’s stick with that scenario in relation to Costco. Over the past five years, many high-end consumers have amassed fortunes via investments thanks to the prolonged low interest rate environment. When the impact of central banks eventually leads us back to reality, those same investors will lose a considerable amount of their wealth. This won’t be devastating to Costco because not all of its customers are investors and those that are will still recognize the benefits of shopping at Costco, but it won’t help either.

Target was the worst hit of the three during the last financial crisis, but given the fact that it attracts all types of consumers without a lot exposure to the high-end or low-end, it should hold up best (relatively speaking). Target customers have a median household income of $64,000, and 43% of them have children at home. This is a positive combination because it means that parents are comfortable shopping at Target for needs. The positive response for customer service at Target is also a plus. This can be said for Costco as well, but not for Wal-Mart. (For related reading, see: 3 Reasons Costco Shouldn't Fear Amazon.)

The Bottom Line

All three retailers know what they’re doing, and all three will be around for a long time. They each target different types of consumers. In the current environment, Target should be the safest, but as a retailer, it still wouldn’t hold up well (temporarily) if the broader market were to falter. Over the long haul, Target and Costco should be better investments than Wal-Mart, but for different reasons. For Target, it’s innovation. For Costco, it’s domestic and international growth potential. This isn’t to say Wal-Mart would be a bad investment option. With so much capital available, it can allocate capital however it wants, including its small-box stores, ecommerce, share buybacks and dividends. If I had to choose one of the three for a long-term investment, it would be Target, but Costco is a close second and this is subject to change. The catch: None of them are as impressive as Amazon. (For related reading, see: Should Amazon (AMZN) Be in Your Portfolio?)

Dan Moskowitz does not own shares in TGT, WMT, COST or AMZN.