Just as surprising, perhaps, Wall Street firms are driving the latest phase of the stock boom. Bad news can make for a good bargain, they say.
"What you see in the popular press is just one part of the picture," said Mark Mobius, a fund manager at Franklin Templeton Investments, which has more than $1 billion invested in Pakistan stocks, mostly in the energy sector. "There's another side to these countries, where life goes on. And that's what we focus on."
(Read more: A perverse Bin Laden incentive for Pakistan)
The gloomy image of Pakistan obscures positive aspects of its economy that, investors say, make some companies an attractive bet. Beyond the headline news, much of the country is getting on with normal life. And with a population estimated at nearly 200 million people — a high proportion of them young — Pakistan offers a large, lucrative market for consumer goods, construction and financial services firms, which constitute the bulk of the Karachi stock market.
The biggest publicly listed companies — like the multinational Nestlé, the Oil and Gas Development Company and Fauji Fertilizer, a military-run conglomerate — pay handsome dividends, which makes them attractive to foreign investors.
And the recent election victory of Prime Minister Nawaz Sharif, a business tycoon, has injected confidence into the financial community, which had been wary of the previous government.
(Read more: Another earthquake rocks shattered southwest Pakistan)
For a time, Pakistani stocks were undervalued by as much as 50 percent to account for risk, compared with a regional discount of about 20 percent, said Taha Javed, a financial analyst in Karachi. Now, as foreign investors pile in, he said, "we are catching up."
Still, there is much to overlook. With painful power shortages, a sliding national currency and dwindling foreign reserves, Pakistan's economy has been on life support in recent years. In August, the International Monetary Fund approved a $6.6 billion emergency loan, on top of $5 billion that Pakistan already owes the fund.
Business safety is a problem. Paramilitary security forces combed Karachi last week as part of a fresh effort to combat criminal gangs that have terrorized the city. Kidnapping for ransom is common. In a "livability" survey of 140 world cities, published by the Economist Intelligence Unit in August, Karachi shared the fourth-to-last rank with the Algerian capital, Algiers. And that is only part of Pakistan's broader security problem, with militant groups and frequent violence against religious and ethnic minorities.
(Read more: Iran nuclear talks: the oil price fallout)
And for all its impressive growth, the stock market can be worryingly unstable, as a sudden dive of about 5 percent last week demonstrated. That slump has now stabilized — it was more of a correction than a crash, it seems — but the market has a history of volatility.
The Karachi exchange closed for four months in late 2008 after an abrupt drop in prices; more recently, it has faced allegations by the news media of insider trading and cronyism. A former chairman of the Securities and Exchange Commission of Pakistan, which regulates the market, is being prosecuted for corruption and tax evasion.