fxregimes          package:fxregime          R Documentation(latin1)

_D_a_t_i_n_g _B_r_e_a_k_s _B_e_t_w_e_e_n _E_x_c_h_a_n_g_e _R_a_t_e _R_e_g_i_m_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Estimate changes/breaks between exchange rate regimes (based on
     exchange rate regression models).

_U_s_a_g_e:

     fxregimes(formula, data, ...)

_A_r_g_u_m_e_n_t_s:

 formula: a '"formula"' describing the linear model to be fit (as in
          'fxlm'.

    data: a '"zoo"' time series.

     ...: further arguments passed to 'gbreakpoints' (currently
          unexported, see below), most of the arguments are identical
          to the 'formula' method of 'breakpoints'

_D_e_t_a_i_l_s:

     'fxregimes' segments an exchange rate regression (Frankel-Wei
     regression) into different regimes. The breakpoints are chosen to
     maximize the likelihood of a Gaussian regression (with
     regime-specific variances). The number of breakpoints are selected
     according to information criteria (by default LWZ, but BIC is also
     reported).

     The computing engine behind 'fxregime' is 'gbreakpoints' that
     generalizes various aspects about 'breakpoints'. Its interface is
     not yet fixed, hence it is not exported in the namespace (and not
     documented). Most arguments are similar to those of the 'formula'
     method of 'breakpoints', in particular the minimal segment size
     'h' and the maximal number of breaks 'breaks'. To select the
     default information criterion the new argument 'ic' can be set
     either to '"LWZ"' (the default) or '"BIC"'.

     A set of methods for useful generic functions is available,
     including 'plot', 'print', 'summary', 'lines', 'coef', 'fitted',
     'residuals', 'breakfactor', 'breakpoints', 'breakdates', etc.
     Mostly, they behave like their '"breakpoints"' counterparts.
     Querying information about the models on each segment is made
     particularly easy by providing a 'refit' method that returns a
     list of 'fxlm' objects.

_V_a_l_u_e:

     An object of class '"fxregimes"' inheriting from
     '"gbreakpointsfull"', '"gbreakpoints"', '"breakpointsfull"',
     '"breakpoints"'.

_R_e_f_e_r_e_n_c_e_s:

     Zeileis A., Kleiber C., Krmer W., Hornik K. (2003), Testing and
     Dating of Structural Changes in Practice, _Computational
     Statistics and Data Analysis_, *44*, 109-123.

     Shah A., Zeileis A., Patnaik I. (2005), What is the New Chinese
     Currency Regime?, Report 23, Department of Statistics and
     Mathematics, Wirtschaftsuniversitaet Wien, Research Report Series,
     November 2005.

     Zeileis A., Shah A., Patnaik I. (2008), Testing, Monitoring, and
     Dating Structural Changes in Maximum Likelihood Models, Report 70,
     Department of Statistics and Mathematics, Wirtschaftsuniversitaet
     Wien, Research Report Series, August 2008.

_S_e_e _A_l_s_o:

     'fxlm', 'fxregimes', 'refit'

_E_x_a_m_p_l_e_s:

     ## load package and data
     library("fxregime")
     data("FXRatesCHF", package = "fxregime")

     ## compute returns for CNY (and explanatory currencies)
     ## for one year after abolishing fixed USD regime
     cny <- fxreturns("CNY", frequency = "daily",
       start = as.Date("2005-07-25"), end = as.Date("2006-07-24"),
       other = c("USD", "JPY", "EUR", "GBP"))

     ## compute all segmented regression with minimal segment size of
     ## h = 20 and maximal number of breaks = 5.
     reg <- fxregimes(CNY ~ USD + JPY + EUR + GBP,
       data = cny, h = 20, breaks = 5, ic = "BIC")
     summary(reg)

     ## minimum BIC is attained for 2-segment (1-break) model
     plot(reg)

     ## two regimes
     ## 1: tight USD peg
     ## 2: slightly more relaxed USD peg
     round(coef(reg), digits = 3)
     sqrt(coef(reg)[, "(Variance)"])

     ## inspect two individual models by re-fitting
     refit(reg)

