fxreturns              package:fxregime              R Documentation

_C_o_m_p_u_t_e _E_x_c_h_a_n_g_e _R_a_t_e _R_e_t_u_r_n_s

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

     Compute a multivariate series of exchange rate returns
     (log-returns in percent) from a multivariate series of exchange
     rates.

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

     fxreturns(x, other = c("USD", "JPY", "DUR", "GBP"), data = FXRatesCHF,
       frequency = "weekly", start = NULL, end = NULL, na.action = na.locf, trim = FALSE)

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

       x: character with column name of selected target currency.

   other: character vector with column names of further currencies (to
          be used as regressors).

    data: a '"zoo"' time series with FX rates (with respect to a base
          currency).

frequency: character specifying whether weekly or daily returns should
          be computed.

   start: start time of the exchange rate series (before computing
          returns).

     end: end time of the exchange rate series.

na.action: function for handling 'NA's.

    trim: logical or numeric. Should time points with extreme returns
          of the target currency be excluded? If set to 'TRUE', the
          quantiles 'c(0.01, 0.99)' are used for trimming.

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

     'fxreturns' is a convenience function for selecting a smaller
     number of currencies from a large database of exchange rates (such
     as 'FXRatesCHF' provided with the package), selecting a certain
     time window (if necessary), computing returns (weekly or daily),
     eliminating missing values and potentially trimming extreme
     returns (of the target currency).

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

     A '"zoo"' with the returns of the specified currencies.

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

     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', 'fxmonitor'

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

