China's stock market is having a banner year, and Asia expert Stephen Roach sees reasons for investors to be optimistic — but not without a caveat.

If the right steps aren't taken, he warns, a stock market shock could come from outside its borders.

"There's just been a progression in the advances that North Korea has made in terms of nuclear weapons capability and in missile delivery capability. And now, we're at a really dangerous point," the Yale University senior fellow said Monday on CNBC's "Trading Nation."

Roach, who spent five years as chairman of Morgan Stanley Asia, has been arguing that China's economy is in the early stages of a "long-heralded structural transformation." He's been closely following China's evolution into a services and consumer-oriented economy.

"My base case for the fundamentals of the Asian economy remain constructive," said Roach, who visits China five to six times a year. "China is in a period of addressing a lot of its structural challenges."

The Hang Seng stock index has surged more than 32 percent this year. There have been concerns that China's economy has been overheating, and too much speculation is baked into its stock market.

Roach doesn't share those concerns but says it's vital for North Korea to abandon its nuclear ambitions for China's growth story to continue.

"This is a potentially destabilizing threat with a very aggressive leadership that seems absolutely fixed on developing a capability and a presence in a nuclear club," he said.

Roach believes sanctions are necessary, and China could set up the most effective ones.

"China is North Korea's largest trading partner," he said. "There's no question that China has leverage."

China provides key items such as fuel and food to North Korea, which has been dealing with serious shortages.

"It's just a question of whether or not they have the willingness to use it or whether or not we have the ability to put pressure on them to use that leverage," Roach said.