Continuous time regime switching model applied to foreign exchange rate