THE restive Pakistani megacity of Karachi, where political parties, criminal gangs and extremist groups vie for control, is also home to one of the worldâ€™s best-performing stockmarkets. The Karachi Stock Exchange (KSE) has risen by 40% in local-currency terms so far this yearâ€”of the stockmarkets tracked by The Economist, only Japanâ€™s has performed better. The KSE sizzled last year, too, posting a gain of 49%. Some of this reflects the countryâ€™s potential. Pakistanâ€™s prospects have been buoyed by the election in May, the first time a fairly elected civilian government served a full term and handed over to another. A new IMF loan was secured in July. The KSEâ€™s rise also reflects investorsâ€™ enthusiasm for â€œfrontier marketsâ€, the worldâ€™s wilder bourses. More familiar emerging markets have lost momentum recently, but the MSCI frontier-markets index has kept climbing. As the name suggests, however, frontier markets are not for the faint-hearted. The KSE is illiquid: only 60 of its 569 listed companies trade regularly. Its soaring performance can partly be attributed to an amnesty announced in January 2012, which allows people to buy stocks until June 2014 with no questions asked about the source of funds. After the amnesty began the average daily volume on the KSE, which has a market capitalisation of only $52.7 billion, more than doubled. The amnesty was intended to bring undocumented funds into the tax net. Some, though, have characterised it as a gift to corrupt officials and criminals: it blocks the tax authorities from asking where the money comes from. The countryâ€™s anti-money-laundering scheme leaves it to the relevant broker or bank to flag any suspicions. Allegations of market manipulation are common. The Securities and Exchange Commission of Pakistan (SECP), the market regulator, is criticised for being too close to brokers. Four seats on the nine-member â€œpolicy boardâ€ designated for independent outsiders have largely remained vacant since the board was established 13 years ago to monitor the regulatorâ€™s performance; they are currently unoccupied. When the SECP does mete out fines, they are symbolic. If fines were too harsh firms would delist, officials say. You have been warned.