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)

