In 2000, The Economist referred to Africa as “the hopeless continent.” Many other business publications followed suit. Yet in the past five years there has been a surge in “Africa rising” stories—often by the very same media outlets that offered that grim turn-of-the-century consensus.

The new conventional wisdom is that, while it still has challenging market conditions, Sub-Saharan Africa (SSA) offers tremendous growth opportunities for global business. A majority of its countries are experiencing rapid economic expansion. The business climate has steadily improved. An extremely high percentage of its population is under thirty, which means both an expanding workforce and a growing consumer base.

Ameet Morjaria, assistant professor of managerial economics and decision sciences at the Kellogg School, sat down with Aubrey Hruby, author of The Next Africa and an advisor to Fortune 500 companies and investors doing business in Africa, to discuss the continent’s growth challenges and opportunities.

This interview has been edited for length and clarity.

Morjaria: I see several factors potentially driving growth throughout the continent: improved governance, Chinese investment, and an improving business climate. What do you see as the big-picture trends in African markets?

Hruby: I think demography is destiny, and it is undoubtedly true that Africa has the youngest work force on the planet. Wages are rising in China, which means there will be pressure to push some global trade and production to African markets.

Some African markets are converging with the fast-growing BRIC (Brazil, Russia, India, and China) countries, while other markets are diverging from that model and falling further behind. So it’s become more and more difficult to talk about a singular “African market” because the experience of individual countries is going to be dramatically different. Why this divergence? Mostly it has to do with diversification. Right now we see East African countries like Ethiopia, Kenya, and Uganda doing better during the commodities downturn because they are more diversified and less dependent on exporting oil and minerals. Nigeria, on the other hand, is in full recession, but it is still doing better than Angola, for example, because Nigeria is relatively more diversified.

Morjaria: Of course, one of the challenges in Africa is accessing reliable data. But there are some telltale signs of a growing middle class, such as mobile network penetration. And we might infer from census reports that a middle class (those with a disposable income of $2 to $20 per day) makes up around 10 percent of sub-Saharan Africa in the 2010s compared with less than five percent in the 2000s. On a recent trip to Rwanda, Ethiopia, Uganda, and Kenya, I noticed how many new malls and supermarkets there are. Is it fair to say that there is now an emerging middle class in SSA?

Hruby: I sometimes resist that phraseology, because I think most people in developed countries would shiver at the thought of “middle class” being defined as an earning level of two to three dollars a day. And as you say, a lot of the numbers are controversial. When we were writing the book, my coauthor and I found estimates ranging from 30 million to 300 million people, depending on how you measure it and whether you count households or individuals.

What is true is that there is certainly rising disposable income, but there’s confusion about what segments it applies to, and where the consumers are for specific goods. That’s why you’ve seen some dramatic scalebacks from large consumer companies like Nestle, but you also see an increase in private equity funds focusing on consumer-facing investments.

Morjaria: I think sometimes people forget that it’s the growth opportunities that create the middle class—and lead to the shopping malls—not the other way around. What consumer markets do you see as being most ripe for investment?

Hruby: I would say the larger markets such as Kenya, Ethiopia, and Nigeria, because scale is important. When you have low margins as you do on some consumer products, you need high volume.

But it really depends on what your product is. Let’s say you’re selling baby food. Well, baby food is only relevant when you have a GDP per capita equivalent of over $1,000 a year. There aren’t many countries that have that, but there are cities that do, so your business-development strategy will need to focus on cities with a certain income—it won’t be a nationally focused approach.

Morjaria: Another trend I see is market formalization. Obviously, a formal economy allows for better taxation, regulation, accountability, and consumer protection. But a huge part of the African economy can still be considered “informal.” In some cases long-term business relationships can go a long way, even when governing institutions are weak in sectors that we would consider modern, such as the cut-flower industry. I recently did some research on the Kenyan cut-flower industry, which is thriving despite the general absence of formal contracts between foreign buyers and domestic sellers.

Do you think this diversity of market opportunity keeps economies vibrant?

Hruby: The problem is that informal economies don’t provide for the protection of formal employment.

In the United States, we’re debating the fact that many of the jobs created since 2008 have been in the gig economy. There’s a general lack of job security with these jobs that is very similar to what already exists in the informal sector in African markets. Many people become entrepreneurs by default. If you offered them regular paying jobs with career progression, they would rather take those than the daily hustle and uncertainty of trying to grow their street-selling business.

Morjaria: Right. If you’re relying on informal arrangements, it limits the size of the economy. You see a lot of activity at the bottom, but it’s hard for an economy to scale up without protections. Often leading to what many economists now recognize as the “missing middle” in firm-size distribution across African economies.

“I think you’ll see more people enter the middle class from a top-down perspective rather than from the bottom-up through entrepreneurship.” —Aubrey Hruby

Hruby: I think you’ll see more people enter the middle class from a top-down perspective rather than from the bottom up through entrepreneurship. The people who are hired by Equity Bank, for example, which is expanding all over East Africa—people with traditional-wage jobs—those are the people who are truly coming into the middle class.

A lot of global companies have had to learn how to sell in informal markets. Coca-Cola has mastered this. They have a manual distribution program: push-cart delivery guys going around the slums of Nairobi. One of the lessons they’ve learned is that you can combine low-tech with high-tech. So yes, they’re using manual distributions, but these distributors all have smartphones that are tracking their route and efficiently tracking orders.

Morjaria: You also see the informal sector learning from the more formal sector. The vegetable seller in Nairobi is now more concerned about keeping his outlet neat and having plastic bags on hand. He’s catering to low-income people but he knows there are rich people who might want to stop in the street and buy fresh food.

Hruby: For consumers, this means 360-degree immersive experience of the market. If you are stuck in traffic in Lagos, you can buy peanuts from a street vendor. Order Chicken Republic, the Nigerian version of KFC, on your phone and they promise to deliver by motorbike anywhere in the city within 30 minutes. You can also stop by a modern grocery store on your way home. It is a complete consumer experience.

Actually, I think this immersive experience is starting to take hold in developed markets. UberEATS parallels Nigeria’s consumer experience here in the U.S.

Morjaria: Let’s talk about risk. As with all emerging markets, there are substantial risks and challenges involved when operating in SSA. How do you view these risks?

Hruby: I think all too often people tend to focus on the wrong types of risk. Of course, it depends on what industry or sector you’re in. But I would say that, writ large, outside companies tend to focus too much on headline or political risk, when really they should focus more on counterparty risk—the risk of your partners defaulting or failing to deliver.

If you’re in the consumer-goods sector—let’s say you’re selling toothpaste—and there’s a disputed election, well, people still need to brush their teeth. You need to worry more about the company you are acquiring—their ability to distribute, their management team—than you need to worry about a disputed election. If you’re an infrastructure firm with a decade-long outlook, you need to think a lot more about headline, or political, risk—but even in those cases, it can be mitigated through insurance products, proper project structuring, and solid strategy.

Morjaria: I definitely agree that counterparty risk is very important. But I also think macro-level risks need to be taken seriously. For example, take growth disasters. If you look at the last 60 years, four out of five African countries have had a ten-year period or longer where they grew at less than 1% (which equals the worst growth of the U.S. economy in the last 60 years). I think that number says something: these economies are still vulnerable to commodity price shocks, leadership changes, and lack of infrastructure.

A recent case I am writing involves the new nation of South Sudan. It’s a majority Christian country, and there’s a huge demand for beer, but SABMiller’s $70 million brewery—the only one in the nation—had to shut down in April. The economic opportunity was there. They managed the counterparty risk. But ongoing political turmoil triggered a weakening of the macroeconomic conditions. Governance issues related to the country’s ethnic fragmentation, infighting over natural resources, and a collapse in oil prices—combined with a fixed exchange rate—meant that the brewery was unable access foreign exchange to ensure that it could purchase and import raw materials for brewing.

It helps to note that this underestimation of the macro risk is not uncommon across emerging markets—consider the recent run of the Brazilian economy, for instance.

Hruby: I think to get a clear picture of the risks and opportunities, it helps to juxtapose the companies that have either misread the market or pulled out with those that are invested in being as local as they can while balancing with their global supply chain.

You also have to contrast things like the economic-development model of Ethiopia, which is very state-led growth, versus a Kenyan development model, which is much more focused on open-market entrepreneurship. Choice of market will depend on the industry and strength of the companies. In the immediate term, I’m bullish on East Africa, and over the more medium term, I believe Nigeria will return to a positive trajectory.

Companies with interest in being part of the next wave of African growth—one that will be rapid, nonlinear, and complicated—should work with professional partners with deep experience in the region and track records of success. Beyond that, U.S. companies need to take a leap of faith into frontier markets and learn, innovate, and iterate as they feel their way toward sustainable profits. Pre-market entry research, data collection, and strategizing will only go so far in Africa’s fast-changing markets.