A gradual rise by the yen in recent weeks culminated in a dramatic surge — firing a warning shot for world markets and the global economy in 2019.

Historically, outsized gains in short periods, such as the Russian default in 1998 and the global market meltdown in 2008, are a harbinger of stress for global markets. Market watchers say the yen's latest ascent is a sign that the global economy is set for a rocky ride ahead.

Signs are growing that the global economy is headed for a slowdown. In an environment like that, the yen tends to thrive. Japan's large current account surplus means global markets consider it a safe haven.