fxmonitor              package:fxregime              R Documentation

_M_o_n_i_t_o_r _E_x_c_h_a_n_g_e _R_a_t_e _R_e_g_r_e_s_s_i_o_n_s

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

     Score-based monitoring of exchange rate regression models
     (Frankel-Wei models).

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

     fxmonitor(formula, data, start, end = 3, alpha = 0.05, meat. = NULL)

     ## S3 method for class 'fxmonitor':
     plot(x, which = NULL, aggregate = NULL,
       ylim = NULL, xlab = "Time", ylab = "Empirical fluctuation process",
       main = "Monitoring of FX model", ...)

_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 (including history and monitoring time
          period).

   start: starting time (typically in '"Date"' format) of the
          monitoring period.

     end: end of the monitoring period (in scaled time, i.e., total
          length divided by length of history period).

   alpha: significance level of the monitoring procedure.

   meat.: optionally the meat of an alternative covariance matrix.

       x: an object of class '"fxmonitor"' as fitted by 'fxmonitor'.

   which: name or number of parameter/process to plot.

aggregate: logical. Should the multivariate monitoring process be
          aggregated (using the absolute maximum)? Default is to
          aggregate for multivariate series.

ylim, xlab, ylab, main, ...: graphical parameters.

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

     'fxmonitor' is a function for monitoring exchange rate regression
     models (also known as Frankel-Wei models). It fits the model on
     the history period (before 'start') and computes the predicted
     scores (or estimating functions) on the monitoring period. The
     scaled and decorrelated process can be employed for monitoring as
     described by Zeileis (2005) using a double-maximum-type procedure
     with linear boundary. The critical values are interpolated from
     Table III in Zeileis et al. (2005).

     Because the model just has to be fitted once (and not updated with
     every incoming observation), the interface of 'fxmonitor' is much
     simpler than that of 'mefp': The 'data' should just include all
     available observations (including history and monitoring period).
     Instead of updating the model with each incoming observation, the
     whole procedure has to be repeated.

     The 'plot' method visualizes the monitoring process along with its
     boundaries. The 'print' method reports the breakdate (time of the
     first boundary crossing, if any), which can also be queried by the
     'breakpoints' and 'breakdates' methods.

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

     An object of class '"fxmonitor"' which is a list including
     components: 

 process: the fitted empirical fluctuation process,

       n: the number of observations in the history period,

 formula: the formula used,

    data: the data used,

 monitor: start of the monitoring period,

     end: end of monitoring period,

   alpha: significance level of monitoring procedure,

 critval: the critical value (for a linear boundary).

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

     Zeileis A., Leisch F., Kleiber C., Hornik K. (2005), Monitoring
     Structural Change in Dynamic Econometric Models, _Journal of
     Applied Econometrics_, *20*, 99-121.

     Zeileis A. (2005), A Unified Approach to Structural Change Tests
     Based on ML Scores, F Statistics, and OLS Residuals. _Econometric
     Reviews_, *24*, 445-466.

     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'

_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"))

     ## monitor CNY regression as in Shah et al. (2005)
     mon <- fxmonitor(CNY ~ USD + JPY + EUR + GBP,
       data = cny, start = as.Date("2005-11-01"))
     mon

     ## visualization
     plot(mon)
     plot(mon, aggregate = FALSE)
     plot(mon, which = "(Variance)")

     ## query breakpoint/date
     breakpoints(mon)
     breakdates(mon)

