Stéphane Goutte
email: goutte@math.univ-paris-diderot.fr

Benteng Zou
email: benteng.zou@uni.lu

Continuous time regime switching model applied to foreign exchange rate *

Keywords: Foreign exchange rate, Regime switching model, Cox-Ingersoll-Ross model, financial crisis F31 C58 C51

Modified Cox-Ingersoll-Ross model is employed, combining with Hamilton (1989) type Markov regime switching framework, to study foreign exchange rates, where all parameter values depend on the value of a continuous time Markov chain. Basing on real data of some foreign exchange rates, the Expectation-Maximization algorithm is extended to this more general model and it is applied to calibrate all parameters. We compare the obtained results regarding to results obtained with non regime switching models and notice that our results match much better the reality than the others without Markov switching. Furthermore, we illustrate our model on various foreign exchange rate data and clarify some significant economic time periods in which financial or economic crisis appeared, thus, regime switching obtained.

Introduction

Exchange rate, which measures the price of one currency in term of some others, is one of the most important topics in international finance and policy making. Directly and indirectly, exchange rate shifts can affect all sorts of assets prices. Investors take into account the effect of exchange rate fluctuations on their international portfolios. Governments are serious about the prices of exports and imports and their domestic currency value of debt payments, such as the huge debate of the Chinese Yuan's evaluation in recent years. Central banks care about the value of their international reserves and about the fluctuation effect of exchange rate on their domestic inflation.

Theoretically, [START_REF] Amin | Pricing foreign currency option under stochastic interest rates[END_REF] study the price of foreign currency option under stochastic interest rates which indirectly demonstrate that the exchange rates behave similarly to the short term stochastic interest rate, with its own return and volatility. [START_REF] Choi | The valuation of foreign currency option under stochastic interest rates[END_REF] develop this model and offer some numerical simulations with finite element methods for different options. [START_REF] Melino | and the pricing and hedging of long-term foreigne currency options[END_REF] work out a stochastic exchange rate model with focus on longer term volatility, which is stochastic process itself. [START_REF] Fu | On the valuation of an option to exchange one interest rate for another[END_REF] uses different framework than the Amin and Jarrow (1991) by developing the [START_REF] Margrabe | The value of an option to exchange one asset for another[END_REF] model but in term of two-factor Heath, Jarrow and Morton (1992)'s framework, and shows also some numerical results as to options on exchange rate. All the above models, among some others, are about exchange rate options basing on different interest rates in domestic and foreign country, rather than the exchange rate itself.

Nevertheless, starting from the seminal paper of [START_REF] Meese | Empirical exchnage rate models of the seventies: Do they fit out of sample[END_REF], a vast empirical research has been done as to predict and forecast the exchange rate behavior. [START_REF] Meese | Empirical exchnage rate models of the seventies: Do they fit out of sample[END_REF]Rogoff (1983a, 1988) and more recently [START_REF] Cheung | Empirical exchange rate models of nineties: Are any fit to survive[END_REF] find that a random walk model forecasts exchange rate better than economic models. [START_REF] Rossi | Optimal tests for nested model selection with underlying parameter instability[END_REF] suggests that one could use optimal tests to see whether exchange rates are random walks. Furthermore, [START_REF] Rossi | Are exchange rates really random walks? some evidence robust to parameter instability[END_REF] predicts "a random walk forecasts future exchange rates better than existing macroeconomics models". Alvarez, Atkeson and Kehoe (2007) state "nominal rates of exchange between major currencies are well approximated by random walk" and they also mention that "the data on exchange rates pushes us to the view that analysts of monetary policy must look in new directions for tools to help us understand how policy affect the economy. " and "..changes in monetary policy affect the economy primarily by changing risk", "... asset markets are segmented and that monetary policy affects risk by endogenously changing the degree of market segmentation". Therefore, in this paper, following this kind of idea, we introduce a continuous time mean reverting regime switching model to study stochastic exchange rate dynamics.

Markov Switching model defines two or more states or regimes, and hence, it can present the dynamic process of variables of concern vividly and provide researchers and policy makers with a clear clue of how these variables have evolved in the past and how they may change in the future. [START_REF] Engle | Long swings in the Dollar: Are they in the data and do markets know it?[END_REF] first study the exchange rate behavior using non mean-reverting Markov switching model basing on quarterly data in exchange rate, during the period of [1973][1974][1975][1976][1977][1978][1979][1980][1981][1982][1983][1984][1985][1986][1987][1988], and find that Markov switching model is a good approximation to the series. [START_REF] Engle | Can the Markov switching model forcase exchange rates?[END_REF] extends this work and studies whether Markov switching model is a useful tool for describing the behavior of 18 exchange rates and he concludes that the Markov switching model fits well in-sample for many exchange rates, but the Markov model does not generate superior forecasts to a random walk or the forward rate. [START_REF] Engle | The distribution of exchange rates in the EMS[END_REF] examine the behavior of European Monetary System exchange rates using Markov switching model and find that the changes in exchange rate match the periodic extreme volatility. [START_REF] Marsh | High-frequency Markov switching models in the foreign exchange market[END_REF] goes one step further and study the daily exchange rates of three countries against the US dollar by applying Markov switching model and concludes that the data are well estimated by Markov switching model though the out-of-sample forecasting are very poor due to parameter instability. And [START_REF] Bollen | Regime switching in foreign exchange rates: Evidence from surrency option prices[END_REF] examine the ability of regime switching model to capture the dynamics of foreign exchange rates and their test shows that a regime-switching model with independent shifts in mean and variance exhibits a closer fit and more accurate variance forecasts than a range of other models, though the observed option prices do not fully reflect regime switching information.

Recently, [START_REF] Bergman | Real Exchange rates and switching regimes[END_REF] notice that the Markov switching model is good to describe the exchange rates of six industrialized countries against the US dollar. [START_REF] Cheung | Exchange rate and Markov switching Dynamics[END_REF] test three dollar-based exchange rates by quarterly and monthly data, respectively, and notice that monthly data "...unambiguous evidence of the presence of Markov switching dynamics". Their findings suggest that "data frequency, in addition to sample size, is crucial for determining the number of regimes". More recently, [START_REF] Ismail | Detecting regime shifts in Malaysian exchange rates[END_REF] employ Markov switching model to capture regime shifts behavior in Malaysia ringgit exchange rates against four other countries between 1990 and 2005. They conclude that Markov Shifting model is found to successfully capture the timing of regime shifts in the four series.

Except the above mentioned work, [START_REF] Lopez | Exchange rate cointegration across central bank regimes shifts[END_REF] studies the exchange rate market in the long run (and short run) by specially taking into account the central bank regime shift and claims that the central bank activity do have long term effects on exchange rates (except the short term impacts). These analysis confirms that the Hamilton's Markov switching model is a good way to study the exchange rate behavior given the fact that the real world economies is changing from regime to regime due to different crisis and/or policies. Exchange rate regime changes and the effects on some key macroeconomic variables are studied by [START_REF] Caporale | Mominal exchange rate regimes and the stochastic behavior of real variables[END_REF], who offer some insight of the effects of some regime changes on the real world.

In this present paper, we would rather see from a different direction than them. That is, we would like to see what is the inverse effect-suppose the macroeconomic regime switches, how the exchange rate would follow? To capture the stochastic nature of foreign exchange rate, we modify the [START_REF] Cox | A theory of term structure of interest rates[END_REF] stochastic interest rate model to measure exchange rate. More than that, our model is particularly having a mean reverting part. By doing so, we calibrate our model basing on real daily exchange rate data from Jan. 2000 until Oct. 2011, present the Expectation-Maximization algorithm and do some comparison with respect to some other non-regime switching models. We are convinced that our finding, that is, stochastic exchange rate under regime switching model, can sharply catch the regime switching time and period. Furthermore, two type of regimes: good and bad economic performance or normal and crisis periods, is better for most of the exchange rates studies than more regimes. And that confirms again the data frequency argument of [START_REF] Cheung | Exchange rate and Markov switching Dynamics[END_REF]. The very recent paper of [START_REF] Naszodi | Exchange rate dynamics under state-contingent stochastic process switching[END_REF] is close to our idea of switching regime effects on exchange rate. However, our regime shifting is more general than [START_REF] Naszodi | Exchange rate dynamics under state-contingent stochastic process switching[END_REF], in which the switching is only about the exchange rate regime changes "from free floating to a completely fixed one", such as "the adoption of the Euro". And then she finds some closed-form solutions.

Nonetheless, in doing so, we employ time series filtering and smoothing technique to smooth out the noisy data. This technique promises that our results capture more precisely the trend of exchange rates than the standard Hamilton's Markov switching model, which could be over-affected due to noise in the data, and hence misleading the regime switching results. 1To our knowledge this is the first time that combination of Cox-Ingersoll-Ross (hereafter in short CIR) framework with Markov regime switching model is employed to study foreign exchange rates, though similar idea is used recently by [START_REF] Driffill | The effects of different parameterizations of Markovswitching in a CIR model of bond pricing[END_REF] in studying bonds prices, however there is no data smoothing process in their work. In this paper, with refined and modified filtering and smoothing algorithm , we show that the regime switching Cox-Ingersoll-Ross model fits better foreign exchange rate data than, firstly, non regime switching CIR and, secondly, other non regime switching models. This paper is arranged as following: Section 2 presents the exchange rate Cox-Ingersoll-Ross model with regime switching. Section 3 documents real data, refined and modified filtering and smoothing algorithm, some calibration, simulation analysis and some comparison results. Section 4 shows the economic and financial interpretation and source of volatility and Section 5 concludes.

The model

In this section, we first introduce the continuous time Cox-Ingersoll-Ross process with regime switching parameters. Then, some examples of real word regime switching are followed.

Let T > 0 be a fixed maturity time and denote by (Ω, F := (F t ) [0,T ] , P) an underlying probability space. Recall that a CIR process is the solution, for all t ∈ [0, T ], of the stochastic differential equation given by

dr t = (α -βr t )dt + σ √ r t dW t (2.1)
where W is a real one dimensional Brownian motion and α, β and σ are constants which satisfy the condition σ > 0 and α > 0. We assume that r 0 ∈ R + and 2α ≥ σ 2 , which ensures that the process (r t ) is strictly positive. As r t falls and approaches zero, the diffusion term (which contains the square root of the process r) also approaches zero. In this case, the mean-reverting drift term dominates the diffusion term and pulls the exchange rate back towards its long-run mean. This prevents the exchange rate from falling below zero. Hence, the drift factor, (α-βr t ) ensures mean reversion of the process towards the long run value α β , with speed of adjustment governed by the strictly positive parameter β. From economic point of view, if the value of β is big then the dynamic of the process r is almost near the value of the mean, even if there is a spike at time t ∈ [0, T ]. Then, for a small time , the value of r t+ will be again close to the value of the mean. Definition 2.1 Let (X t ) t∈[0,T ] be a continuous time Markov chain on finite space S := {1, 2, . . . , K}. Denote F X t := {σ(X s ); 0 ≤ s ≤ t}, the natural filtration generated by the continuous time Markov chain X. The generator matrix of X will be denoted by Π X and it is given by

Π X ij ≥ 0 if i = j for all i, j ∈ S and Π X ii = - j =i Π X ij otherwise. (2.2) Remark 2.1
The quantity Π X ij represents the intensity of the jump from state i to state j.

Hence, we can give the definition of a CIR process with each parameters values depend on the value of a continuous time Markov chain.

Definition 2.2

Let, for all t ∈ [0, T ], (X) t be a continuous time Markov chain on finite space S := {1, . . . , K} defined as in Definition 2.1. We will call a Regime switching CIR (in short, RS-CIR) the process (r t ) which is the solution of the stochastic differential equation given by

dr t = (α(X t ) -β(X t )r t )dt + σ(X t ) √ r t dW t (2.3)
where for all t ∈ [0, T ], the function α(X t ), β(X t ) and σ(X t ) are constants which take values in α(S), β(S) and σ(S) such that

α(S) := {α(1), . . . , α(K)}, β(S) := {β(1), . . . , β(K)} and σ(S) := {σ(1), . . . , σ(K)} ∈ R K+ .
For all j ∈ {1, . . . , K}, we have that α(j) > 0 and 2α(j) ≥ σ(j)2 .

For simplicity, we denote the values α(X t ), β(X t ) and σ(X t ) by α t , β t and σ t .

Remark 2.2

-It is obvious that in our model there are two sources of randomness: the Brownian motion W appearing in the dynamic of r and the Markov chain X. We assume that they are mutually independent.

-This is an important point since the randomness due to the Markov chain can be see as an exogenous factor like an economic impact factor.

The use of Hamilton's (1989) Markov-switching models to study business cycle, economic growth and unemployment rate et al is not new. Here, we just mention a few. In his seminal paper, Hamilton (1989) already notices that Markov-switching models are able to reproduce the different phase of the business cycles and captures the cyclical behavior of the U.S. GDP growth data. McConnell and Perez-Quiros (2000) use an augmented model, compare with Hamilton's original model and test the data up to the late 1990s. They notice the recessions clearer in their series by the augmented power. [START_REF] Kontolemis | Analysis of the US Business Cycle with a Vector-Markov-Switching Model[END_REF] applies multivariate version of the model used by [START_REF] Engle | Long swings in the Dollar: Are they in the data and do markets know it?[END_REF] to a four time series composing the composite coincident indicator in the U.S. data in order to identify the turning points for the U.S. business cycle. More recently, Bai and Wang (2010) go one step further by allowing changes in variance and show that their restricted model well identifies both short-run regime switches and long-run structure changes in the U.S. macroeconomic data.

In Europe, [START_REF] Ferrara | The contribution of cyclical turning point indicators to business cycle analysis[END_REF] employs Markov-switching model to construct probabilistic indicators and serves as useful tools for providing original qualitative information for economic analysis 2 , especially " to monitor on a monthly basis turning points in the business cycle in French industry and those in the acceleration cycles in the French economy as a whole" and "Indicators of this nature are currently being developed for the euro area as a whole". Billio and Casarin's (2010) recent working paper study the Euro area by considering monthly observation from January 1970 until May 2009 of the industrial production index. They find that their new class of Markov switching latent factor model (with stochastic transition probability) "implies a better description of the dynamics of the Euro-zone business cycle".

Basing on the above facts that Markov switching models capture the economic cycles and regime switching, therefore, we would like to see how the exchange rates would behave, do the exchange rates follow the economic regime switching and how large (or small) are the effects?

In order to answer these questions, in next section, we first introduce some real data followed by some calibration and estimation, and at the end we compare the RS-CIR model with some other models.

Calibration and model comparison on real data

In this section, we first present real foreign exchange rate data 3

Heuristic of the calibration method

The calibration method is based on the Expectation-Maximization EM-algorithm developed in Hamilton (1989a, b) and generalized in [START_REF] Choi | Regime-Switching Univariate Diffusion Models of the Short-Term Interest Rate[END_REF] or more recently in Janczura and Weron (2011).

Suppose the size of historical data is M + 1. Let Γ denote the corresponding increasing sequence of time where this data value are taken:

Γ = {t j ; 0 = t 0 ≤ t 1 ≤ . . . t M -1 ≤ t M = T }.
Then, define the discretized approximation model is given for all k ∈ {1, . . . , M },

r t k -r t k-1 = α t k -β t k r t k-1 ∆ t + σ t k √ r t k-1 ∆W t k .
Here the time step ∆ t is equal to one since we have uniform equidistant time data values. Then

∆W t k ∼ √ ∆ t t k = t k , where t k ∼ N (0, 1). Hence, it yields r t k -r t k-1 = α t k -β t k r t k-1 + σ t k √ r t k-1 t k , r t k = α t k + (1 -β t k ) r t k-1 + σ t k √ r t k-1 t k . (3.4)
We will denote by F r t k the vector of historical value of the process r until time t k ∈ Γ. Hence F r t k is the vector of the k + 1 last value of the discretized model defined in (3.4). Hence F r t k = (r t 0 , r t 1 , . . . , r t k ).

To estimate the optimal set of parameters Θ := αi , βi , σi , Π , for i ∈ S, we use the EMalgorithm where the set of parameter Θ is estimated by an iterative two-step procedure. First, the Expectation procedure or E-step, where we evaluate the smoothed and filtered probability. In fact the filtered probability is given by the probability such that the Markov chain X is in regime i ∈ S at time t with respect to F r t . And the smoothed probability is given by the probability such that the Markov chain X is in regime i ∈ S at time t with respect to all the historical data F r T . Second, the Maximization step, or M-step, where we estimate all the parameters of the vector Θ using maximum likelihood estimation and the probability obtained in the E-step. More precisely, the process is giving as follow: Proposition 3.1 The calibration method is given by the following procedure.

Starting with an initial vector set

Θ (0) := α (0) i , β (0) i , σ (0)
i , Π (0) , for all i ∈ S. Fixed N ∈ N, the maximum number of iteration we authorize for this method (for the step 2 and 3 of EM-algorithm). And fixed a positive constant ε as a convergence constant for the estimated log likelihood function.

2. Assume that we are at the n + 1 ≤ N steps, calculation in the previous iteration of the algorithm yields vector set

Θ (n) := α (n) i , β (n) i , σ (n) i , Π (n) .

E-

Step : Filtered probability: For all i ∈ S and k = {1, 2, . . . , M }, evaluate the quantity

P X t k = i|F r t k ; Θ (n) = P X t k = i|F r t k-1 ; Θ (n) f r t k |X t k = i; F r t k-1 ; Θ (n) j∈S P X t k = j|F r t k-1 ; Θ (n) f r t k |X t k = j; F r t k-1 ; Θ (n) (3.5)
with

P X t k = i|F r t k-1 ; Θ (n) = j∈S Π (n) ji P X t k = j|F r t k ; Θ (n) (3.6)
where f r

t k |X t k = i; F r t k-1 ; Θ (n)
is the density of the process r at time t k conditional that the process is in regime i ∈ S. Observed by (3.4), that given F r t k-1 , the process r t k has a conditional Gaussian distribution with mean

α (n) i + 1 -β (n) i r t k-1
and standard deviation σ

(n) i √ r t k-1 ,

whose density function is given by

f r t k |X t k = i; F r t k-1 ; Θ (n) = 1 √ 2πσ (n) i √ r t k-1 exp      - r t k -(1 -β (n) i )r t k-1 -α (n) i 2 2 σ (n) i 2 r t k-1      . (3.7)
Smoothed probability: For all i ∈ S and k = {M -1, M -2, . . . , 1}

P X t k = i|F r t M ; Θ (n) = j∈S P X t k = i|F r t k ; Θ (n) P X t k+1 = j|F r t M ; Θ (n) Π (n) ij P X t k+1 = j|F r t k ; Θ (n) . (3.8)

M-Step :

The maximum likelihood estimates Θ (n+1) for all model parameters is given, for all i ∈ S, by

α (n+1) i = M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k -(1 -β (n+1) i )r t k-1 M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 , β (n+1) i = M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k-1 B 1 M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k-1 B 2 , σ (n+1)
i = M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k -α (n+1) i -(1 -β (n+1) i )r t k-1 2 M k=2 P X t k = i|F r t M ; Θ (n)
, where

B 1 = r t k -r t k-1 - M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k -r t k-1 M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 , B 2 = M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 r t k-1 M k=2 P X t k = i|F r t M ; Θ (n) |r t k-1 | -1 -r t k-1 .
Finally, the transition probabilities are estimated according to the following formula

Π (n+1) ij = M k=2 P X t k = j|F r t M ; Θ (n) Π (n) ij P Xt k-1 =i|F r t k-1 ;Θ (n) P Xt k =j|F r t k-1 ;Θ (n) M k=2 P X t k-1 = i|F r t M ; Θ (n)
. (3.9)

Denote by

Θ (n+1) := α (n+1) i , β (n+1) i , σ (n+1) i
, Π (n+1) , the new parameters of the algorithm and use it in step 2 until the convergence of the EM-algorithm. In fact, we stop the procedure if one of the following conditions are verified: [START_REF] Janczura | Efficient estimation of Markov regime-switching models: An application to electricity wholesale market prices[END_REF]. Formula to obtain all Π (n+1) ij is deduced from [START_REF] Kim | Dynamic linear models with Markov-switching[END_REF].

Since the log likelihood function is increasing in each iteration of the procedure, we don't need to

put absolute value for the left side quantity appearing in (3.10).

Estimation of the parameters on foreign exchange rate data

We begin by giving in Table 1 some general descriptive statistics for all foreign exchange rate data.

Parameters estimation

Starting from a model with two regimes S = {1, 2}, we represent two states of the economy: good and bad economic performance or a "normal" and crisis economy. More interpretation and intuition will be presented in Section 4. We first need to take initial parameters Θ (0) :

Datas

-an initial regime distribution equals to 1 2 , 1 2 . Hence, begin with the same probability in each regime.

-a transition matrix Π (0) such that Π

(0) 11 = Π (0) 22 = 1 2 .
-initial parameters value α (0) , β (0) , σ (0) given by global maximum likelihood estimation without regime shift. Where the quantities π 1 and π 2 represent the stationary distribution of the Markov chain given by

(π 1 , π 2 ) = 1 -ΠX 22 2 -ΠX 11 -ΠX 22 , 1 -ΠX 11 2 -ΠX 11 -ΠX 22 .
Moreover, we can see that the presence of mean reverting effect (i.e. the parameter βi ) in each data can't be rejected. Figures 4, 5 and6 give the evolution of the values of parameters in each regime during all the calibration procedure. We can observe that, in all the case, convergence of the EM-Algorithm happens in less than 40 steps.

Remark 3.4

In all the figure in this subsection, the regime 1 will be in color blue and regime 2 in color red.

Smoothed and Filtered probabilities

This subsection is devoted to present the smoothed and filtered probabilities, basing on real data. Usually, "smoothed probabilities allow for the most information ex-post analysis of the data, while filtered probabilities are useful for forecasting" as stated by [START_REF] Calvet | Multifractal Volatility: Theory, Forecasting, and Pricing[END_REF]. 4 Figures 7, 8 and9 give the smoothed and the filtered probabilities. 4 For more detail, see for example, [START_REF] Calvet | Multifractal Volatility: Theory, Forecasting, and Pricing[END_REF].

Value of the Regime during time.

Basing on and using the above estimations and classifications, we can reproduce the exchange rates, whose origin real data are presented at the beginning of this section.

Regime classification measure (RCM)

An ideal model is that classifying regimes sharply and having smoothed probabilities which are either close to zero or one. Hence, to measure the quality of regime classification, we propose the regime classification measure (RCM) introduced by Ang and Bekaert (2002) and generalized for multiple state by [START_REF] Baele | Volatility Spillover Effects in European Equity Markets[END_REF].

Let K > 0 be the number of regimes, the RCM statistics is then given by

RCM (K) = 100 1 - K K -1 1 T T t=1 K i=1 P X t = i|F r T ; Θ - 1 K 2 (3.11)
where the quantity P X t k = i|F r t M ; Θ (n) is the smoothed probability given in (3.8) and Θ is the vector parameter estimation results. The constant serves to normalize the statistic to be between 0 and 100. Good regime classification is associated with low RCM statistic value: a value of 0 means perfect regime classification and a value of 100 implies that no information about regimes is revealed.

We evaluate RSM statistics for our foreign exchange rates data and results are stated in Table 3 Table 3 clearly documents that for all foreign exchange rate data the regime classification measure (RCM) is close to zero. This indicates that the two regimes obtained via the EMalgorithm classify the data in a very good way. And hence, there exists different regimes in the dynamics of foreign exchange rate. Therefore, it is better to take into account the existence of this regime switching in modeling foreign exchange rate dynamics. Furthermore, we discover that the best RCM is obtained for the Euro/Livres foreign exchange rate.

Comparison with other models

Interesting tests are done to show that as expected the regime switching CIR model fits better foreign exchange rate data than, firstly, non regime switching CIR and, secondly, other non regime switching models. For this aim, we evaluate the log likelihood values of each models obtained in the calibration. Thus, we use a likelihood maximization procedure. Since all the calibration procedures are based on maximize the log likelihood function, we can discern that among all foreign exchange rate data the RS-CIR model gives the best calibration results. On the one hand, it is easily to observe that RS-CIR gives better results than non regime switching CIR model. Furthermore, these achievements confirm results obtained by the regime classification measure in Table 3. On the other hand, our analysis verifies that CIR type of models fit better foreign exchange rate data than other stochastic models because the log likelihood values for the Vasicek model or the GBM model are less than these obtained via CIR model. This is been confirmed by the estimation of the mean reverting parameter. Indeed, we have shown in the calibration part (see Table 2) that the presence of mean reverting effect (i.e. the parameter βi ) in each data can't be rejected. Hence it is natural to find that included mean reverting effect give better result than other one.

Impact of regime switching in each parameters

It is very interesting to evaluate the case where one of the three parameters of the model doesn't depend on the regime switching process. This exercise, showed in Table 5 for the Euro/Dollars foreign exchange rate data by assuming that one parameters doesn't depend on the regime switching, gives a log likelihood value less than the RS-CIR model. This means that the CIR model, where all parameters depend on the regime switching process, fits better to the real data. Therefore, assuming that the speed of adjustment process β or the volatility parameter σ equal in each regime give worse calibration results than in the RS-CIR model.

Three Regimes case

One step further from the previous subsections, we would like see what would happen if there exist three Markov switching regimes. One captures "normal" economic dynamics, a Jan 00 Jan 01 Jan 02 Jan 03 Jan 04 Jan 05 Jan 06 Jan 07 Jan 08 Jan 09 Jan 10 Jan 11 Oct 11 0.8 0.9 time periods (see Section 4 for more economic and financial interpretations): the first one, in green, correspond to the lower value time period and the second one, in red, the higher value time period. Hence, this two periods are differentiate by our long mean level value α2 β2 = 1.3432 for the regime 2, in red, and α3 β3 = 0.9016 for the regime 3, in green.

The truth that the three regime case gives better calibration results than the two regimes case is only due to this special form of the data's plot. If we do the same calibration for the Euro/Yuan exchange rate which have the similar two regime calibration as the Euro/Dollars, we don't obtain better results with three regimes. Actually, it's even worse, as we saw in Table 6, we find a RCM value of 36.42 against 18.22 and the good classify only 63.26% of the data against 82.79% in the two regimes case. These results can be see in the figure calibration result given in Figure 14 where we clearly observe that it seems to be very difficult to find significant economic or financial interpretations of the blue and red regime classification.

In conclusion, two regimes seems to be the best choice because it gives significant better result in most cases. The gain of good classification obtained by the smoothed probability indicator in three regimes case is only 7.35% for the Euro/Dollar foreign exchange rate while we lose -51.56% for Euro/yen, -65.78% for Euro/Livre and -23.59% Euro/Yuan. Hence, it's better to always take two regimes rather than three.

Jan 00 Jan 01 Jan 02 Jan 03 Jan 04 Jan 05 Jan 06 Jan 07 Jan 08 Jan 09 Jan 10 Jan 11 Oct 11 6.5

Economic and financial interpretations

This section dedicates to provide evidences on some of the features of international regime switching or business cycle which may influence the exchange rates as we document in Section 3.

-The left graph in Figure 10 indicates clearly two significantly different time periods.

The first one, in blue, corresponds to an increasing time period where the value of the change is better for Euro zone. This can be seen from the value of estimating parameters. Indeed, in this regime the speed of adjustment parameter β is close to zero ( β1 = 0.001294) which means that the Euro-dollar exchange rate dynamic has a mean reversion close to zero. The second one, in red, corresponds to a more volatile time period where the volatility in this regime equals 0.025852 against 0.014986 as in regime 1. This shows an increasing of the volatility which equals to 72.51%. Hence, all the crisis periods fall into this regime which are the periods ( -Similar finding is also presented in the right graph of Figure 10 which reads that there are two different time periods: regime 1 corresponding to a time period where the value of the change is better for Dollar zone; and a second regime which corresponds to stable or constant period as the crisis-mode policy taken by the People's Bank of China.

It is worth noticing that the financial crisis which broke out in the United States in 2008 shot the global financial markets and dented investment confidence. The People's Bank of China then took a crisis-mode policy by stoping the gradual appreciation of the RMB against dollar: The yuan/dollar rate has been stable at about 6.86± 0.3 percent since July 2008. Zhou Xiaochuan, governor of the central bank, said in March 2010 that the exchange rate policy China took amid the crisis was part of the government's stimulus packages, and would exit "sooner or later" along with other crisis-measures. China's June 20, 2010, announcement that it would allow more flexibility in its yuan exchange rate meant an end to the crisis-mode policy the government took to cushion the blow from the global financial crisis. Zhao said when the RMB exchange rate regime becomes more marketoriented, China's export businesses should take more responsibilities and become more self-reliant.

Furthermore, we can remark that the volatility of this foreign exchange rate is very close to zero: 0.006980 in regime 1 and 0.001249 in regime 2.

-For the Euro/Yen calibration, we can see on the left graph of Figure 11 that is the case where one regime corresponds to standard dynamic and the other one catches the spikes of the dynamics. The regime 1 (blue color) documents the two crisis time periods mentioned above.

This crisis regime has a very high value for the speed of adjustment parameter, β1 = 0.068287. This is typically a spike regime where the value of the foreign exchange rates change brutally, then returns quickly to the mean value. And of course the volatility in the crisis regime is bigger than the volatility in the standard economy regime. σ1 = 0.396827 against σ2 = 0.182396, this corresponds to an increasing of 117.56%.

-For the Euro/Livre calibration shows on the right graph of Figure 11 that regime 2, in red, corresponds to a crisis time period. Thus, the autumn 2008 crisis and the time period between January 2000 and March 2001 fall in this regime.

The foreign exchange rate dynamic in this crisis time period has, again, a higher estimated volatility than in the standard regime (in blue). Indeed, σ2 = 0.016095 and σ1 = 0.007954, this is an increasing of 102.35% of the volatility. We observe again that the speed of adjustment parameter is bigger in the crisis regime, β2 = 0.005374 against β1 = 0.002115 (+154.09%).

-Finally, the Euro/Yuan calibration presented in Figure 12 states the same regime cut as Euro/Livre foreign exchange rate. But here the impact of the crisis is less pronounced in term of volatility, only +60.70% than in term of the speed of adjustment +334.57%.

Conclusion

Theoretically, empirically, politically and academically, there have been enormous studies and analysis about currency exchange rates, the corresponding the courses of volatilities, and so on. The previous findings, which we present some of them in the introduction, are mixed and each has its own focus.

In this present framework, we initially introduce a continuous time mean reverting Cox-Ingersoll-Ross model with regime switching parameters to model foreign exchange rates in order to understand whether it is possible that stochastic exchange rates catch the real worlds regimes switching, such as financial crisis and economy taking off, and how fast the exchange react to these kind of changes.

We have clearly documented that mean reverting regime switching Cox-Ingersoll-Ross model fits much better foreign exchange rate data than non regime switching models. Moreover, the regime switching process (i.e. a homogeneous continuous time Markov chain on a finite state space S) allows us to highlight some economic and financial time period where dynamics of foreign exchange rates are significatively different. Furthermore, we extend the expectationmaximization algorithm, with filtering and smoothing technique to smooth out noisy data, to calibrate regime switching model and show that only a few number of step is needed to obtain a very good calibration. Thus, this refined and modified filtering and smoothing algorithm could be used for other studies and tests of time series related topics, such as the macroeconomic effects of tax changes and more detail can be find in [START_REF] Romer | The Macroeconomic effects of tax changes: Estimates based on a new measure of fiscal shocks[END_REF].

Figure 1 :Figure 2 :Figure 3 :

 123 Figure 1: On left: Price of 1 Euro in Dollars between Jan. 2000 and Oct. 2011. On right: Price of 1 Yuan in Dollars between Jan. 2006 and Oct. 2011.

  (a) We have done N times the procedure. (b) The difference between the log likelihood at step n + 1 ≤ N denoted by logL(n + 1) and at step n, satisfied the relation logL(n + 1) -logL(n) < ε.

Figure 4 :Figure 5 :Figure 6 :

 456 Figure 4: Evolution of the calibrated parameters values: on left: Euro/Dollars and on right: Yuan/Dollars.

Figure 7 :Figure 8 :

 78 Figure 7: Smoothed and Filtered probabilities for: on left: Euro/Dollars and on right: Yuan/Dollars.

Figure 9 :

 9 Figure 9: Smoothed and Filtered probabilities for Euro/Yuan.

Figures 10 ,Figure 10 :Figure 11 :Figure 12 :

 10101112 Figures 10, 11 and 12 give trajectories of foreign exchange rate with respect to the value of the current regime.

Figure 13 :

 13 Figure 13: Euro/Dollar foreign exchange rate with respect to the regime state for: on left: two regimes and on right: three regimes.

Figure 14 :

 14 Figure 14: Euro/Yuan foreign exchange rate with respect to the regime state for: on left: two regimes and on right: three regimes.

  for different currencies. Our samples of exchange rate include Euros VS Dollars, Yuan VS Dollars, Euro VS Yen, Euro VS Livre (GB) and Euro VS Yuan. Figure1, 2 and 3 show the historical value of the corresponding daily foreign exchange rates over the period of January 1st, 2000 until October 30, 2011, except for the foreign exchange rate Yuan VS Dollars which begins in January 2006 since before it is a fixed constant.

	1.6
	1.5	8
		7.8
	1.4
		7.6
	1.3	7.4
	1.2	7.2
	1.1	7
		6.8
	1
		6.6
	0.9	6.4
	Jan 00 Jan 01 Jan 02 Jan 03 Jan 04 Jan 05 Jan 06 Jan 07 Jan 08 Jan 09 Jan 10 Jan 11 Oct 11 0.8 Dates	Jan 06 6.2	Jan 07	Jan 08	Jan 09	Jan 10	Jan 11	Oct 11
					Dates

Table 1 :

 1 Summary Statistics

		Minimum Maximum	Mean	Std. Dev. Skewness Kurtosis
	Euro/Dollars	0.8324	1.5849	1.2133	0.2001	-0.0029	0.0032
	Yuan/Dollars	6.3809	8.0702	7.1376	0.5164	0.0771	0.1298
	Euro/Yen	90.5300	169.77	129.2698 18.9615	1704	297557
	Euro/Livre	0.5794	0.9610	0.7219	0.0985	0.0007	0.0002
	Euro/Yuan	6.8839	11.192	9.2504	1.1390	-0.6313	3.4378

Table 2

 2

		gives values of the parameters estimation.
		Euro/Dollars	Yuan/Dollars	Euro/Yen	Euro/Livre	Euro/Yuan
	α1	0.004040 (0.0070) 0.002560 (0.0209) 7.521336 (5.8552) 0.002023 (0.0064) 0.322545 (0.3334)
	α2	0.010101 (0.0294) 0.019622 (0.1845) 0.189793 (1.0862) 0.004852 (0.0109) 0.102217 (0.0708)
	β1	0.001294 (0.0059) 0.001503 (0.0029) 0.068287 (0.0516) 0.002115 (0.0095) 0.040280 (0.0390)
	β2	0.010156 (0.0244) 0.002873 (0.0263) 0.000713 (0.0083) 0.005374 (0.0137) 0.009269 (0.0075)
	σ1	0.014986 (0.0008) 0.006980 (0.0004) 0.396827 (0.0594) 0.007954 (0.0004) 0.066847 (0.0077)
	σ2	0.025852 (0.0036) 0.001249 (0.0028) 0.182396 (0.0088) 0.016095 (0.0014) 0.041598 (0.0021)
	ΠX 11 ΠX 22	0.991944 0.984304	0.984915 0.956565	0.965800 0.995146	0.995989 0.992084	0.977872 0.989608
	π 1	0.660828	0.742231	0.124282	0.663682	0.319560
	π 2	0.339172	0.257769	0.875718	0.336318	0.680440

Table 2 :

 2 Maximum Likelihood estimation results with standard errors in parentheses.

Table 3 :

 3 . RCM statistics.

		Euro/Dollars Yuan/Dollars Euro/Yen Euro/Livre Euro/Yuan
	RCM(2)	14.87	6.25	7.61	4.85	18.22

  1) between January 2000 and March 2001 and (2) from the autumn 2008 global financial crisis afterward.The first Euro crisis, as addressed by BusinessWeek on October 2, 2000, that "The euro is in crisis, and as it goes, so may go the future of the New Europe. After a flawless and much-acclaimed debut just 20 months ago, Europe's new single currency has lost more than 25% of its value against the dollar-and there is still no bottom in sight." And this down-move of Euro to Dollar ended at the starting of recession in the U.S.economy from March 2001. In deed, the NBER's Business Cycle Dating Committee has determined that a peak in business activity occurred in the U.S. economy in March 2001. That is the end of an expansion and the beginning of a recession. As this committee also announced later onMarch 17, 2003, that this recession finished in 8 months, that is, the beginning of 2002.However, this expansion did not last too long, global financial crisis which started in the U.S. in December 2007, resulted in the collapse of large financial institutions, the bailout of banks by national governments and downturns in stock markets around the world. It contributed to a significant decline in economic activity, leading to a severe global economic recession in 2008-2009. The financial crisis was triggered by a complex interplay of valuation and liquidity problems in the United States banking system in 2008.

As to this points, see more clearly in[START_REF] Dacco | Why do regime-switching models forecast so badly[END_REF].

The idea of using Markov switching model was first proposed by[START_REF] Baron | Un indicateur de retournement conjoncturel dans la zone euro[END_REF].

The data are taken on the web site http://fxtop.com/fr/

Indeed, a good classification for data can be see when the smoothed probability is less than 0.1 or great than 0.9. Then this means that the data at time t ∈ [0, T ] is with a probability higher than 0.9 in one of regimes for the 10% error and higher than 0.95 for the 5% error. We will call this percentage as the smoothed probability indicator with p% error and we will denote here by P p% .

 6: RCM statistics in the case of two and three regimes and percentage given by the smoothed probability indicator for 10% and 5% in parenthesis in the case of 2 and 3 regimes.

It is clear from the first two lines in Table 6 that the regime classification measure is bigger in three regimes cases than in the two regimes case for all the data except for the Euro/Dollar exchange rate. Moreover, we notice that in the case of Euro/Yen, Euro/Livre and Euro/Yuan, the three regimes cases give very bad classification. In fact, in the case of Euro/Livre that only 32.95% of the data are good classified 5 for 10% error and only 23.33% for 5% error. Nevertheless, we also observe that in the case of Euro/Dollars, the RCM value obtained with 3 regimes is smaller than with 2 regimes, 7.98 against 14.87. This results is confirmed by the value of the smoothed probability indicator. Indeed, for 10% error, 92.87% of the data are good classified in the 3 regimes model while only 86.51% in the 2 regimes case.

Figure 13 displays that the three regime case separates better the second regime, in red, than in the two regimes case. The three regimes cases differentiate the two level of the more volatile