Estimate changes/breaks between exchange rate regimes (based on exchange rate regression models).
further arguments passed to
a character specifying the high performance computing support.
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
The computing engine behind
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
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
A set of methods for useful generic functions is available, including
breakdates, etc. Mostly, they behave
"breakpoints" counterparts. Querying information about the
models on each segment is made particularly easy by providing a
method that returns a list of
Optional support for high performance computing is available, currently using
foreach for the dynamic programming algorithm.
hpc = "foreach" is to be used, a parallel backend should be registered
foreach for more information.
An object of class
"fxregimes" inheriting from
Zeileis A., Kleiber C., Krämer 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. http://epub.wu.ac.at.
Zeileis A., Shah A., Patnaik I. (2010), Testing, Monitoring, and Dating Structural Changes in Exchange Rate Regimes, Computational Statistics and Data Analysis, 54(6), 1696–1706. http://dx.doi.org/10.1016/j.csda.2009.12.005.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.