China's surprise devaluation of its currency is continuing to send ripples through equity markets worldwide on Wednesday. In the U.S., the Dow Jones Industrial Average (DJINDICES:^DJI) and the broader S&P 500 (SNPINDEX:^GSPC) are down 1.04% and 0.99%, respectively, at 12:30 p.m. EDT. The Nasdaq Composite was down 1.01%. Beyond the direct effects of the currency devaluation, investors are concerned that the decision to devalue reflects Chinese authorities' attempt to address a slowing economy. 

However, when broad macro-economic worries cause the market to mark stocks down indiscriminately, it creates opportunity for investors -- particularly those with an equity-appropriate holding period (i.e., five to 10 years, at a minimum). Let me illustrate that process.

Source: Martin Thoma under a Creative Commons license.

On Monday afternoon, premium burger chain Shake Shack released its second-quarter results, which surpassed Wall Street's expectations on revenues and earnings per share. Better yet, the company raised revenue guidance for the full year to a range of $171 million to $175 million (from $161 million to $165 million). 

However, the new information with the greatest impact on the stock's valuation is management's accelerated plan to add new company-operated "Shacks" (burger outlets). The company now expects to open 12 new Shacks this year, and plans to open "at least 12 domestic company-operated Shacks per year moving forward [looking to 2016 and beyond]", a marked improvement relative to the forecast it described in the prospectus for its January IPO: 

We expect that we will open at least 10 domestic company‑operated Shacks each fiscal year for the foreseeable future, which is the primary driver of our expected sales growth.

Despite this, Shake Shack shares actually declined 2.9% on Tuesday after having been up 7.5% intraday. This is surely due to a combination of (1) the announcement -- also on Monday afternoon -- of a secondary share offering in which pre-IPO investors will sell 4 million shares, and (2) the broad market losses related to China. 

Shake Shack has no presence in China, and it has not disclosed any plans to open any Shacks there. 

Today, the news of the offering ought to be discounted in the stock price, yet the selling continues, with the stock down another 5.34% at 12:45 p.m. EDT (Shake Shack shares are naturally more volatile than the S&P 500). That puts the shares close to last Thursday's closing price. 

I happen to think Shake Shack's stock is expensive, but if you liked it last Thursday, you ought to like it that much more today, regardless of what is happening with the Chinese yuan. The key, company-specific news that has surfaced since then -- and that has a direct positive impact on the stock's valuation -- is that long-term growth expectations are better than previously thought. 

In this situation -- as with any other stock you own or are looking at -- focus on the factors that are most relevant to the company's fundamentals and valuation, and ignore those that are immaterial or tangential, at best.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.