Shares of Nike (NYSE:NKE) and Ulta Beauty (NASDAQ:ULTA) have suffered as both retailers temporarily closed their stores due to the coronavirus pandemic. The shares are down 7% and 13%, respectively, this year. Now, as both companies are beginning to reopen shops, it's time to take a look at what their futures might look like.

But first: Why compare Nike and Ulta? Both are giants in their fields and have delivered years of revenue growth. Nike is a maker of athletic wear, known for its alliance with basketball legend Michael Jordan and its sponsorship deals with numerous professional sports teams. Ulta is a cosmetics shop offering a vast variety of brands. Like Nike, it has harnessed the power of celebrities. For example, Kylie Cosmetics -- Kylie Jenner's brand -- offers products exclusive to Ulta.

A basketball hovers over the basket as a player makes a shot.

Image source: Getty Images.

So which retailer makes the best addition to your portfolio right now?

A look at Nike

Annual revenue has been growing at Nike since 2011. Nevertheless, recognizing heightened competition with European rival adidas and the need to better reach customers digitally, the company launched a plan in 2017 to boost direct sales to customers through Nike's own shops and to increase sales online by leaning on the power of its mobile app. The Nike App serves as a hub to keep Nike fans connected to everything Nike. It offers customers product recommendations, special invitations, and early access to sneakers and other gear, among other benefits.

Looking at Nike's earnings report prior to the coronavirus outbreak offers us a view of how this strategy is working. In Nike's fiscal 2020 second quarter, digital sales climbed 38%, with online sales for Black Friday in North America surging more than 70%. The Jordan brand also posted its first $1 billion quarter.

The coronavirus pandemic slowed things down in the most recent quarter. In February, the athleticwear giant temporarily closed about half of its stores in China. It then shut stores in North America and other parts of the world as the outbreak spread. Now, nearly all stores in China have reopened, and shops elsewhere are gradually reopening. In the third quarter of fiscal 2020, which ended on Feb. 29, digital sales remained encouraging, up 36%. Digital sales even rose 30% in China, in spite of the health crisis. Still, Nike said it expects the shutdowns to have a "material impact" on operations in the current reporting period.

A glimpse at Ulta

Ulta's annual revenue has been climbing for about 15 years, though a general slowdown in cosmetics sales has been a headwind recently. U.S. prestige beauty industry sales were flat last year compared with the prior year, and cosmetics sales dropped 7%, according to The NPD Group.

In its most recent quarter, Ulta reported a single-digit decline in cosmetics sales. Makeup -- Ulta's biggest category -- represents about 48% of the company's sales. The company will release its next quarterly earnings report on May 28, and investors should expect to see an impact from the temporary shutdown of stores.

Prior to the coronavirus outbreak, over 80% of Ultamate Rewards loyalty program members shopped in-store only, and about 12% of members shopped both online and in-store. It's possible that more Ulta customers have switched to online shopping while the stores have been closed. Like Nike, Ulta has worked to strengthen its e-commerce platform, so it will be interesting to see how much that may have buoyed sales during the closures.

Nike or Ulta?

I expect the upcoming earnings reports from both retailers to be grim due to store closures and related expenses. And recovery may take a while. Record weekly unemployment claims mean many Americans have lost their jobs and aren't ready to spend on discretionary items like sports gear and cosmetics.

But I favor long-term investing, so I won't be discouraged by what I see in the coming weeks. On a trailing-12-month price-to-earnings basis, Ulta is a lot cheaper than Nike. The shares are trading at about 18 times earnings, close to their lowest since 2009. At nearly 35 times earnings, Nike's shares are trading at the same level as last year.

Still, even though Nike stock isn't trading at a discount, I think recovery might be easier for Nike than it will be for Ulta. Nike managed to maintain strong digital growth in the early part of the crisis, so I'm confident that once the economy begins to pick up, its digital strategy will bear more fruit. And as sporting events resume, Nike should get an additional boost. The company launches new products linked to such events, and fans are always eager for souvenirs.

So in this Nike versus Ulta game, Nike secures the win.