Iran's stocks are surging, even as the world sinks into a bear market.

The main Tehran stock market has jumped 22% since the nuclear sanctions lifted in January, and is up 25.6% so far this year.

Some U.S. and European Union embargoes on Tehran ended on January 16, partially restoring the country's access to world markets.

Analysts at ACL, an investment firm focused on Iran, said investors are attracted by the market's low valuations and the prospect of new investment and a pick up in economic growth.

The Tehran Stock Exchange is among the five biggest markets in the Middle East, with more than 300 listed companies and a market cap of around $100 billion. That's an advantage over other markets that are opening up to the world. Cuba, Myanmar and other countries hoping to attract investors are nowhere near as developed.

"Iran is a G20 country in waiting," said Bart Helg, a partner at ACL. "It has the largest educated population in the region and the largest market...its geographical position de facto positions it as regional economic leader," he added.

Still, Iran's market is tiny by global standards: The S&P 500 had a market cap of more than $17.8 trillion at the end of January.

Related: For Iran, oil exports matter more than price

The biggest companies listed in Iran include oil and steel enterprises, telecommunication companies, and banks.

ACL said the surge in the market has been driven mostly by domestic investors so far.

Financial sanctions have in the past prevented international investors from entering the market, but some Western investors can now buy shares in most of the companies listed in the market. There are still some restrictions, however, and investing is off limits for American investors.

Iran is keen on attracting more investment. International business delegations are pouring into the country, and Iran's president Hassan Rouhani traveled to Europe last month.

The U.S. might lose out on the boom. While the U.S. lifted its nuclear sanctions on Iran, many business sanctions remain in place.

There's a plenty of risk too. Iran is betting big on its return to the global oil market, planning huge investment into its oil infrastructure. But crude prices have been collapsing. Iran has been trying to diversify, but still relies on energy for up to 25% of its government revenue.