One of Asia's best-performing stock markets doesn't care about bomb blasts and an infringement of democratic rights.
In a year that has seen stocks around the world waver amid volatility, Thailand's SET index has rallied 19.32 percent so far this year, trailing only behind the Karachi 100 index in Pakistan.
The gains compare with a 9.78 percent year-to-date rally in the MSCI International All country Asia Pacific ex Japan index.
To some outside observers, the lofty heights of the stock market may appear to be in contrast with the situation on the ground.
Thailand's last democratically-elected government was ousted two years ago and a series of recent attacks in popular tourist spots revived concerns over the presence of extremist elements in the country.
Exactly a year ago, a bombing at a popular tourist destination in capital Bangkok left 22 dead and 123 injured.
So why are investors flocking to buy Thai stocks?
Analysts say a confluence of domestic and external factors has underpinned demand.
For one, the economy has held up well. The growth rate in the three months through June was the fastest in 13 quarters. The sharp decline in oil prices has also bolstered the current account surplus and supported the baht.
"I think [the] Thai market is considered one of [the] safe havens by foreign investors," Kasem Prunatanamala, head of equity research in Thailand at CIMB, told CNBC by email. "Our economy is less exposed to the external environment and political situation is relatively stable."
Earlier this year, the Thai government approved constructions of several new rail lines in traffic-clogged Bangkok, reported Reuters.
Prunatanamala said these initiatives could spur private investments from property developers who are "likely to develop residential, commercial and office buildings along the mass rapid transit systems," boosting demand for building materials and creating jobs. This would, in turn, create a positive feedback loop for the economy.
On the currency front, Prunatanamala said the Thai baht has also been stable due to the "huge current account surplus of $25 billion in first half 2016 [which] is equivalent to about 4.5 percent of GDP."
The political uncertainty that has bedeviled Thailand for most of the last two decades has also abated somewhat, with the military junta winning support for constitutional amendments that it says will curb corruption.
Analysts said that the outcome to the referendum earlier this month pointed to political stability in Thailand, which would allow the government to pursue policies in Thailand's economic interest, including the continuation of its infrastructure investments.
The backdrop for emerging market assets has also become more clement as returns in developed markets get ever more puny.
Experts said this inflow of foreign funds is what's been primarily driving emerging markets in the region.
The stability in the baht has increased the attractiveness of local stocks for overseas investors who would be otherwise concerned about the gains in the underlying asset being wiped out by currency losses.
"For three to four years, the world on aggregate has been very much underweight emerging markets. And emerging markets now look very cheap," Michael Preiss, executive director at Taurus Wealth Advisors, told CNBC's "Capital Connection" on Monday.
"Why would you invest in European government bonds at negative rates?" he said.
Throwing a wrench in the works, however, was a wave of bombing and arson attacks that rocked southern Thailand late last week, with Reuters reporting that the attacks could result in the country losing up to 200,000 foreign visitors and $293 million in tourism revenue this year. Tourism is a key revenue source for Thailand.
But market reaction to the attacks was muted.
Credit Suisse analysts Dan Fineman and Siriporn Sothikul said in a note to clients while the bombings raise questions over further attacks in the future, the impact on markets was short-lived during the similar attack in Bangkok last August.
"Our main concern with the market now is valuation, not bombings," the analysts said. "The market outside banks and property is trading well above historical averages and thus is vulnerable to disappointment."
Nomura's ASEAN equity strategist, Mixo Das, agreed, telling CNBC on Monday that valuations in the Thai market are "way extended."
The SET index currently trades at a price-to-earnings (P/E) ratio of 17.58 and a dividend yield of 3.05 percent. This compares with a P/E ratio of 21.63 for the PSEi in the Philippines and 19.05 times for the Jakarta SE composite index in Indonesia.
Data compiled by Nomura also showed the MSCI Thailand had a P/E ratio of 15.1 as of August 12, 2016, which was 2.6 standard deviation from the long term average of 11.
It should, however, be noted that compared to other MSCI indexes, the absolute valuation of MSCI Thailand is still lower. For example, MSCI Shenzhen A shares have a P/E ratio of 26.9 while MSCI Philippines shares have a P/E ratio of 19.8, the data provided by Nomura showed.
Nomura downgraded the Thailand market at the end of March to underweight, citing factors including elevated valuations, slowing domestic fund flows, weaker growth and rising political risks.
Though the market has since performed strongly, boosted by improved earnings and the recent political stability brought by the referendum, Das said he doesn't expect the gains to sustain.
He said despite the inflow of foreign funds into Thailand, the market is still driven by domestic flows which are slowing down.
"If you look at both institutional and retail investors in Thailand, they have been selling Thai equities over the last month or so," he said, adding, "inflows into mutual funds in Thailand, which have been the biggest buyers in Thai equities, [have] also been slowing down."