Is now really the best time to invest in Nigeria?

Is Nigeria a safe place to invest in?
Is Nigeria a safe place to invest in?   

Nigeria's economy has gone from strength to strength in the past couple of years, but with terrorist attacks on the rise and elections coming up, is it really that safe to invest in Africa's largest economy?

"Nigeria offers far too many opportunities to be ignored and despite all this noise, right now is the time to invest", Anna Rosenberg, associate practice leader for Sub Saharan Africa at Frontier Strategy Group told CNBC on Tuesday.

Security concerns and volatility are nothing new in Nigeria, Anna Rosenberg said, so investors in the country are aware of these challenges and know how to deal with them.

"These security concerns are a bit of a risk", Shilan Shah, Africa economist at Capital Economics told CNBC by phone, but while the recent kidnapping of school girls by Islamic militants Boko Haram has gained significant media coverage, "in reality it's an organization that's been operating for 15 years."

However, as next year's presidential and national assembly elections approach, several factors will undermine Nigeria's economic potential.

Jahi Chikwendiu | The Washington Post | Getty Images

Read More Africa investors turn away from commodities

Historically, volatility in Nigeria has always increased as elections get nearer and the terrorist attacks rocking the country could get worse.

According to Maplecroft's Terrorism and Security Dashboard statistics for Nigeria, April was the deadliest month Nigeria had seen since September with 430 deaths. In May, 424 fatalities have been recorded to date.

"In the last calendar year", the global risks analysis firm highlights, "terrorist attacks in Nigeria have effectively doubled."

Boko Haram may be correctly labeled as a radical Islamist group, Rosenberg said, but "its grievances are much more economic in nature." While Nigeria overtook South Africa in early April to become Africa's largest economy after a rebasing of its GDP, wealth redistribution remains a crucial problem.

"Even though Nigeria's economy has been booming in the last couple of years, it has not translated in the creation of jobs and the reduction of unemployment," explained Rosenberg, adding that in Boko Haram's strongholds – the north and center of the country – poverty levels remain "extremely high."

"They see the South booming and that does not translate in opportunities with them" Rosenberg said.

Furthermore, the elections and the power struggle currently gripping the country will likely have a negative impact on the reform agenda.

Read MoreHere's where Africa's richest man sees investment opportunity

For Shilan Shah, these elections represent a risk in the short term as it looks like it will be a very close race.

President Goodluck Jonathan's approval ratings have fallen following recent events, Shah pointed out, which could therefore push the government into "a bit of a spending spree." This in turn, could lead to a widening of the fiscal deficit and higher inflation.

Long-term prospects

Despite the tough economic environment this year, medium- to long-term economic prospects for the country remain positive, a Frontier Strategy Group report published in March said.

The country is now Africa's largest foreign direct investments beneficiary, and its diversification is well underway. Indeed, the non-oil sector is growing faster than the oil sector as Nigeria's 170 million-strong population starts getting wealthier and consuming more and more.

According to Rosenberg, private consumption should reach $350 billion this year, while it was only $158 billion before the rebase. In contrast, South Africa's consumption is expected to stand at $218 billion this year.

This should boost the consumer goods sector but also the services sector, especially banking as well as the country's "massive entertainment industry, Nollywood", said Rosenberg.

Additionally, Shah said, while oil production has been subdued lately, a push in reforms could see production "ramp up in the coming years."

Read MoreInvesting in Africa: What you should know

Follow us on Twitter: @CNBCWorld