Has the sun set on Africa’s growth story?

Sub-Saharan Africa has been the darling of frontier market investors for several years, with post-conflict countries like Ivory Coast and Mozambique posting growth rates of 7 percent or higher in 2013.

However, a combination of tumbling commodity prices and slower growth in China—not to mention negative publicity from the Ebola epidemic and increasing terrorism in the region—could see its appeal for investors wane.

Sia Kambou | AFP | Getty Images

Employees of a cocoa export company pile up sacks in a packaging factory in the Ivory Coast.

In the first three months of 2015, fund managers raised $1.9 billion to invest in companies in sub-Saharan Africa—all of the continent that lies fully or partially below the Sahara Desert—according to EMPEA. The industry association for private capital in emerging markets (EM) noted that this was the second-highest EM fundraising total behind emerging Asia.

Well-known investors in the region include George Soros, Madeline Albright and Jacob Rothschild, who joined forces last year to back infrastructure company Helios Towers Africa, which buys mobile phone masts in the region.

Another enthusiast is the former head of Barclays, Bob Diamond. He co-founded Atlas Mara, a financial services group focused on sub-Saharan Africa, after resigning from Barclays in 2012 following the U.K. bank's interest-rate-rigging scandal.

Commodities blow

However, in June the World Bank cut its growth outlook for sub-Saharan Africa to 4.2 percent for 2015. This was down from the 4.6 percent rate forecast at the beginning of the year and below the 4.4 percent annual growth rate averaged over the past two decades.

"Growth softened around the turn of the year owing to headwinds from the plunge in the price of oil," the World Bank, which provides loans to developing countries, said in a report on sub-Saharan Africa in June.

John Ashbourne, who covers sub-Saharan African markets for Capital Economics, told CNBC that economists were increasingly downbeat on the region from a domestic standpoint as well.

He said that some of the biggest risks in the region included Kenya's current account deficit and currency weakness, slow growth in South Africa and the hefty efforts needed by Nigeria's new president to get the economy back on track.

Plus, he warned that the region's rapidly growing population could face challenges from overstretched public sectors and natural resources, as well as difficulties in labor markets absorbing fast-rising workforces.

"It's a bit of a grim list, but I suppose that these things go in waves," Ashbourne told CNBC via email. "It's certainly an increasingly pessimistic time in the world of SSA (sub-Saharan Africa) economists."

'New generation' threat

In its April report, the World Bank noted that domestic threats to the region included "a new generation of violent conflict," as well as the ongoing Ebola epidemic that has killed around 11,000 people since December 2013.

Charles Laurie, head of Africa at risk consultancy Verisk Maplecroft, told CNBC: "The sub-Saharan African story is one of fairly strong growth, but we have some poignant and ongoing examples of what could be emerging major security threats, particularly in east Africa, with an unknown lifespan."

In a report last month, Verisk Maplecroft warned that Kenya's capital city Nairobi faced an "extreme" risk of terror attacks, along with five Nigerian cities including the capital of Abuja.

This rating puts the terror threat in these cities within the highest risk category, which also includes the most unstable parts of the Middle East, like Afghanistan and Syria, and reflects the growing clout of Islamist militant groups like Boko Haram in the region.

Investor red lights?

As such, the danger for investors are clear—Nairobi, for instance, is the commercial capital of East Africa, while Nigeria is the region's largest economy, alongside South Africa.

Investor confidence in Kenya has already been hit by the threat from terrorism, according to Verisk Maplecroft, which highlighted that tourism—a sector highly important to the economy—declined by 7.4 percent between 2012 and 2013, costing an estimated $73 million.

"This reemergence of conflict raises important concerns about whether Africa can sustain the progress of the last two decades, especially in the affected countries," said the World Bank in a "Africa's Pulse" report in April.

Clarification: This article has been updated since it was first published to reflect that Nairobi is in the highest risk category for terrorism.