North Korea. A crippling economic boycott by China. A president who was impeached. Massive corporate scandals. None of these things are stopping South Korea’s stock market from rallying to new records.

Today (May 4), Korea’s benchmark Kospi index briefly hit an all-time high. Over $4.5 billion has flowed into Korean stocks in 2017, according to Bloomberg data, and the pipeline for initial public offerings is looking strong, including a $2.3 billion listing by mobile game-maker Netmarble.

But why?

The global economy is looking up

As an export-dependent economy, that’s good news for Korea, which posted better-than-expected GDP growth in the first quarter, with exports continuing to improve. “It appears that investors have been willing to put [the risks to Korea] aside amid a brightening global environment which has led to a rebound in export growth this year,” wrote Capital Economics in a research note.

Samsung

Despite being embroiled in the corruption and influence-peddling scandal that led to the impeachment of former president Park Geun-hye, Samsung shares have been on a tear this year. The conglomerate’s shares account for about 21% of the Kospi (paywall). The trial of Samsung’s de facto leader Lee Jae-Yong (paywall), for example, may be a signal to investors long frustrated with poor governance among large Korean companies that serious corporate reform (paywall) could finally be on the cards. Samsung has also been delivering impressive results, led by its chip business.

The “Korean discount“

Investors are looking to Korea to snap up undervalued shares. One recent study says that based on their price-to-earnings ratio over the last 12 months, Korean stocks are the cheapest in the world compared to both emerging market and developed market equities, as concerns around poor corporate governance have kept Korean stock prices low.

A clean political slate

After months of uncertainty following Park’s ousting, with an interim government in place, investors are ready for someone with a strong mandate to take charge. They’ll look to see whether a more progressive government may finally tackle the stranglehold that huge conglomerates known as chaebol have over the country’s economy, and deliver much-needed economic reforms. Moon Jae-in, currently the favorite to win the presidential election on May 9, has pledged to double fiscal spending if he wins, potentially giving the Korean economy another boost.