Asymmetric Exchange Rate Pass-Through
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Asymmetric Exchange Rate Pass-Through
I'm looking for the codes of the paper entitled "Asymmetric Exchange Rate Pass-Throuh in the Euro Area: New Evidence from Smooth Transition Models" by Nidhaleddine Ben Cheikh and available at http://dx.doi.org/10.5018/economics-ejournal.ja.2012-39
Thanks.
Thanks.
Re: Asymmetric Exchange Rate Pass-Through
Just follow the links in the site you posted to:
http://thedata.harvard.edu/dvn/dv/econo ... 02.1/18603
The .rar file is an archive with the RATS code and data.
http://thedata.harvard.edu/dvn/dv/econo ... 02.1/18603
The .rar file is an archive with the RATS code and data.
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: Asymmetric Exchange Rate Pass-Through
I run the code below but I got this error:
## SX11. Identifier SEASONS is NOT recognizable. Incorrrect Option Field Parameter Order?
>>>>>>>ib{0 to 4} seasons {<<<<<<<<
How do I fix this error? Thanks.
## SX11. Identifier SEASONS is NOT recognizable. Incorrrect Option Field Parameter Order?
>>>>>>>ib{0 to 4} seasons {<<<<<<<<
How do I fix this error? Thanks.
Code: Select all
DISPLAY '*******************************************************'
DISPLAY "Asymmetric ERPT in EA"
DISPLAY '*******************************************************'
CALENDAR 1975 1 4
ALLOCATE 2010:4
OPEN DATA
DATA(FORMAT=XLS,ORG=COLS)
PRINT /
*******************************************************'
SET lipc_1 = log(ipc_1)
SET ltc_1 = log(tc_1)
SET lwpx = log(wpx)
SET lpib = log(pib)
*log transformation
*
set dlipc_1 = log(ipc_1) - log(ipc_1 {1})
set dltc_1 = log(tc_1) - log(tc_1 {1})
set dlwpx = log(wpx) - log(wpx {1})
set dlpib = log(pib) - log(pib {1})
*First difference
*
***********************************************
*Unit root tests:
*********************************************
*
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlipc_1
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlipc_1
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=trend) dlipc_1
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dltc_1
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dltc_1
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dltc_1
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlwpx
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlwpx
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dlwpx
@URADF(maxlag=8,sclags=18,det=constant,signif=.05) dlpib
@Zivot(maxlag=8,signif=.05,CRIT=AIC,BREAK=intercept) dlpib
@LPUnit(maxlag=8,signif=.05,Method=AIC,break=intercept) dlpib
*
******************************************************
*Cointeration test:
******************************************************
*
LINREG lipc_1 / res
# constant ltc_1 lwpx lpib
*OLS estimation
*
@LAGSELECT(MAXLAG=8,SCLAGS=18,DET=constant,SIGNIF=.05) res
*procedure lagselect on residuals
*
@egtestresids(lags=2) res
*Engle-Granger test
******************
*Gregory-hansen test (level shift):
*****************
*
@GregoryHansen(model=CONSTANT,LAGMETHOD=AIC,MAXLAGS=12,nograph) lipc_1
# constant ltc_1 lwpx lpib
*
******************
*Gregory-hansen test (level and slope shift):
*****************
*
@GregoryHansen(model=REGIMETREND,LAGMETHOD=AIC,MAXLAGS=12,nograph) lipc_1
# constant ltc_1 lwpx lpib
*
****************
*ARDL Model:
*************************
*
LINREG dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*OLS estimation
*
*standard equation is trimmed :
*
LINREG(lwindow=neweywest) dlipc_1
# constant dlipc_1{1 4} dltc_1{0 4} dlwpx{0 2 4} dlpib{1 3 4} seasons{-2 to 0}
*
summarize (%beta(5)+%beta(6)+%beta(7))/(1-(%beta(2)+%beta(3)+%beta(4)))
*
**************
*Tests:
***************
*
stat %resids
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
******
*RESET Tests:
********
*
set resids = %resids
@regreset(h=4) resids
*
*************************************************************************************************
*STR Model
*******************
*
set vtc = log(tc_1) - log(tc_1 {1})
*
stat dltc_1
*
display *.####### %variance
*
display *.####### 1.0/sqrt(%variance)
*
**************************************************************************
*LSTR model:
**************************
nlpar(exactlinesearch)
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
frml glstar = logistic = %logistic(20.46*gamma*(dltc_1{4}-c),1.0)
compute c=%mean,gamma=2.0
*
equation standard dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star dlipc_1 = g=glstar,phi1f+g*phi2f
*
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
*
*
nlls(parmset=regparms,frml=star) dlipc_1
*
* ***********
* Based upon the initial results, the standard equation is trimmed. This is now estimated with
* all the parameters.
*
equation standard dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
compute c=%mean,gamma=2.0
*
* We have to re-estimate this since we changed the specification.
*
nlls(parmset=regparms+starparms,frml=star,trace) dlipc_1
*
**************
*Tests:
***************
*
stat %resids
*
*Test d'absence d'autocorrelation residuelles :
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
*Tests d'absence d'effets ARCH :
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
*************************************************************************
*Fonction de transition :
*************************************************************************
*
set cc = %beta(26)
set Seuil = cc(t)
set F_Transition = glstar(t)
set V_Transition = dltc_1{4}
scatter
# V_Transition F_Transition / 10
*
nonlin coef1 coef2 coef3 coef4 coef5 coef6 coef7
compute coef1 = %beta(2)
compute coef2 = %beta(3)
compute coef3 = %beta(4)
compute coef4 = %beta(5)
compute coef5 = %beta(15)
compute coef6 = %beta(16)
compute coef7 = %beta(17)
*
**********************
*ERPT when G=0 :
**********************
*
compte SR = coef2
compte LR = (coef2+coef3+coef4)/(1-(coef1))
*
Display SR LR
*
summarize (%beta(3)+%beta(4)+%beta(5))/(1-(%beta(2)))
*
**********************
*ERPT when G=1 :
**********************
*
compte SR_g = (coef2+coef5)
compte LRg = (coef5+coef6+coef7)/(1-(coef1))
compte LR_g = (coef2+coef3+coef4+coef5+coef6+coef7)/(1-(coef1))
*
display SR_g LRg LR_g
*
summarize (%beta(3)+%beta(4)+%beta(5)+%beta(15)+%beta(16)+%beta(17))/(1-(%beta(2)))
summarize %beta(3)+%beta(15)
*
*
frml pt_sr = coef2+F_Transition*coef5
*
set ERPT_SR = pt_sr
*
frml pt_lr = LR+F_Transition*LRg
*
set ERPT_LR = pt_lr
*
*print / F_Transition ERPT
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_SR
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_LR
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Short-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_SR / 1
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Long-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_LR / 1
*
*
*****************************************************************************************************
*ESTR model :
**************************
*
nlpar(exactlinesearch)
compute scalef=1.0/sqrt(%variance)
nonlin(parmset=starparms) gamma c
frml glstar = exponential = 1-exp(-20.46^2*gamma*(dltc_1{4}-c)^2)
compute c=%mean,gamma=2.0
*
equation standard dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{1 to 4} dltc_1{0 to 4} dlwpx{0 to 4} dlpib{0 to 4} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
frml star dlipc_1 = g=glstar,phi1f+g*phi2f
*
nonlin(parmset=regparms) phi1 phi2
nonlin(parmset=starparms) gamma c
*
*
nlls(parmset=regparms,frml=star) dlipc_1
*
* ***********
* Based upon the initial results, the standard equation is trimmed. This is now estimated with
* all the parameters.
*
equation standard dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
equation transit dlipc_1
# constant dlipc_1{4} dltc_1{0 2 3} dlwpx{0 1 2} dlpib{0} seasons{-2 to 0}
*
frml(equation=standard,vector=phi1) phi1f
frml(equation=transit ,vector=phi2) phi2f
compute c=%mean,gamma=2.0
*
* We have to re-estimate this since we changed the specification.
*
nlls(parmset=regparms+starparms,frml=star,trace) dlipc_1
*
**************
*Tests:
***************
*
stat %resids
*
*Test d'absence d'autocorrelation residuelles :
*
@RegCorrs(number=4,QSTATS,nograph,report) %resids
*
display "AIC" %aic
*
*Tests d'absence d'effets ARCH :
*
@mcleodli(number=4) %resids
*
@ARCHTest(lags=4) %resids
*
*************************************************************************
*Fonction de transition :
*************************************************************************
*
set cc = %beta(26)
set Seuil = cc(t)
set F_Transition = glstar(t)
set V_Transition = dltc_1{4}
scatter
# V_Transition F_Transition / 10
*
nonlin coef1 coef2 coef3 coef4 coef5 coef6 coef7
compute coef1 = %beta(2)
compute coef2 = %beta(3)
compute coef3 = %beta(4)
compute coef4 = %beta(5)
compute coef5 = %beta(15)
compute coef6 = %beta(16)
compute coef7 = %beta(17)
*
**********************
*ERPT when G=0 :
**********************
*
compte SR = coef2
compte LR = (coef2+coef3+coef4)/(1-(coef1))
*
Display SR LR
*
summarize (%beta(3)+%beta(4)+%beta(5))/(1-(%beta(2)))
*
**********************
*ERPT when G=1 :
**********************
*
compte SR_g = (coef2+coef5)
compte LRg = (coef5+coef6+coef7)/(1-(coef1))
compte LR_g = (coef2+coef3+coef4+coef5+coef6+coef7)/(1-(coef1))
*
display SR_g LRg LR_g
*
summarize (%beta(3)+%beta(4)+%beta(5)+%beta(15)+%beta(16)+%beta(17))/(1-(%beta(2)))
summarize %beta(3)+%beta(15)
*
*
frml pt_sr = coef2+F_Transition*coef5
*
set ERPT_SR = pt_sr
*
frml pt_lr = LR+F_Transition*LRg
*
set ERPT_LR = pt_lr
*
*print / F_Transition ERPT
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_SR
*
SCATTER(STYLE=DOTS,OVERLAY=DOTS,OVCOUNT=2,pattern,key=below,nokbox) 2
# V_TRANSITION F_TRANSITION
# V_TRANSITION ERPT_LR
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Short-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_SR / 1
*
GRAPH(STYLE=LINE,OVERLAY=LINE,scale=both,OVCOUNT=1,$
klabel=||"Past Depreciation (Left scale)","Threshold","Long-run ERPT (Right scale)"||,key=below,nokbox,pattern) 3
# V_TRANSITION / 8
# Seuil / 3
# ERPT_LR / 1
*Re: Asymmetric Exchange Rate Pass-Through
It looks like it needs
SEASONAL SEASONS
at some point before the LINREG's start.
SEASONAL SEASONS
at some point before the LINREG's start.
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: Asymmetric Exchange Rate Pass-Through
Thanks a lot for your help. After adding SEASONAL SEASONS in the codes, the program now runs smoothly up to the part with McLeodiLi and ARCH tests. However, I get errors when I get to the estimation of the transition funcitions. Although I am able to plot the transition function, I got an error in the summary of function of coefficients and the latter charts are no longer produced since I got NAs in the summary of function of coefficients.TomDoan wrote:It looks like it needs
SEASONAL SEASONS
at some point before the LINREG's start.
Grateful, if you can look at the codes. Thanks.
Re: Asymmetric Exchange Rate Pass-Through
Comment out the @ARCHTEST procedure calls. They're overwriting the regression information.
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: Asymmetric Exchange Rate Pass-Through
Thanks a million, Tom. Perfect!TomDoan wrote:Comment out the @ARCHTEST procedure calls. They're overwriting the regression information.
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: Asymmetric Exchange Rate Pass-Through
Dear Tom,
May I know how linearity tests against STR model was implemented? Table A1, p.23 of paper on Asymmetric Exchange Rate Pass-Through by Ben Cheikh presents these linearity tests but the codes were not included in the attached RATS code. The examples in the RATS Workbook using @STARTEST use only a univariate nonlinear models. The attached RATS codes also do not include the LM test of parameter constancy and the LM test of no remaining nonlinearity which appear in Table 1, p.15 of the paper.
Grateful if you can look into this query.
May I know how linearity tests against STR model was implemented? Table A1, p.23 of paper on Asymmetric Exchange Rate Pass-Through by Ben Cheikh presents these linearity tests but the codes were not included in the attached RATS code. The examples in the RATS Workbook using @STARTEST use only a univariate nonlinear models. The attached RATS codes also do not include the LM test of parameter constancy and the LM test of no remaining nonlinearity which appear in Table 1, p.15 of the paper.
Grateful if you can look into this query.
Re: Asymmetric Exchange Rate Pass-Through
I'm pretty sure that Table A1 is just a list of results from univariate @STARTEST's. The entire paper is about univariate STAR models.mightydell37 wrote:Dear Tom,
May I know how linearity tests against STR model was implemented? Table A1, p.23 of paper on Asymmetric Exchange Rate Pass-Through by Ben Cheikh presents these linearity tests but the codes were not included in the attached RATS code. The examples in the RATS Workbook using @STARTEST use only a univariate nonlinear models.
You would have to ask the author. You can see his questions and answers (his handle is nbcheikh) about this at:mightydell37 wrote: The attached RATS codes also do not include the LM test of parameter constancy and the LM test of no remaining nonlinearity which appear in Table 1, p.15 of the paper.
https://estima.com/forum/viewtopic.php?f=30&t=747
If the parameter constancy test was actually done with @FLUX, it would not be an LM test---it's a Nyblom fluctuations test instead.
Re: Asymmetric Exchange Rate Pass-Through
Nonlinearity test is done for the multivariate case and specification tests (parameter constancy and no remaining nonlinearity) are LM-type tests, all were done using Jmulti software which is freely downloadable on: http://www.jmulti.de/
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: Asymmetric Exchange Rate Pass-Through
Thanks a lot. I did this for Belgium and true enough, the chosen specification is LSTR for lag 1 of exchange rate depreciation and Linear for lags 2, 3 and 4. However, the LSTR model (even the ESTR model) estimated in RATS uses lag 4 of exchange rate depreciation.
Re: Asymmetric Exchange Rate Pass-Through
Dear Tom;
I downloaded the code from https://dataverse.harvard.edu/file.xhtm ... ersion=2.0. However, I get the signal "## SX11. Identifier AIC is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>TANT,LAGMETHOD=AIC,<<<<
Is it possible you meant
I
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next"
How can I solve it?
Regards;
I downloaded the code from https://dataverse.harvard.edu/file.xhtm ... ersion=2.0. However, I get the signal "## SX11. Identifier AIC is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>TANT,LAGMETHOD=AIC,<<<<
Is it possible you meant
I
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next"
How can I solve it?
Regards;
Re: Asymmetric Exchange Rate Pass-Through
The syntax of @GregoryHansen changed quite a bit in 2012 around when this was written. The first use should now read:
@GregoryHansen(model=CONSTANT,method=AIC,MAXLAGS=12,nograph)
# lipc_1 ltc_1 lwpx lpib
with a similar change to the second one.
Note that this program doesn't really match the paper with which it's attached---it seems to be a similar, but still different analysis with the same data set. (The published paper uses a STAR effect only on the exchange rate, while this applies the threshold to the entire regression).
@GregoryHansen(model=CONSTANT,method=AIC,MAXLAGS=12,nograph)
# lipc_1 ltc_1 lwpx lpib
with a similar change to the second one.
Note that this program doesn't really match the paper with which it's attached---it seems to be a similar, but still different analysis with the same data set. (The published paper uses a STAR effect only on the exchange rate, while this applies the threshold to the entire regression).
Re: Asymmetric Exchange Rate Pass-Through
Dear Tom;
I chnaged the parts of the to RATS_codes to
"@GregoryHansen(model=CONSTANT,method=AIC,MAXLAGS=12,nograph)
# lipc_1 ltc_1 lwpx lpib
"
Howver, I get the warning "Gregory-Hansen Cointegration Test
Null is no cointegration (residual has unit root)
Regression Run From 1975:03 to 2009:03
Observations 137
Break in Intercept. No Trend.
With 0 lags chosen from 12 by AIC
Variables
LIPC_1
LTC_1
LWPX
LPIB
Minimum T-Statistic -4.407
Achieved At 1980:03
1% Critical Value -5.770
5% Critical Value -5.280
10% Critical Value -5.020
## SX11. Identifier SEASONS is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>ib{0 to 4} seasons{<<<<
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
"
How can I solve it?
Regards;
I chnaged the parts of the to RATS_codes to
"@GregoryHansen(model=CONSTANT,method=AIC,MAXLAGS=12,nograph)
# lipc_1 ltc_1 lwpx lpib
"
Howver, I get the warning "Gregory-Hansen Cointegration Test
Null is no cointegration (residual has unit root)
Regression Run From 1975:03 to 2009:03
Observations 137
Break in Intercept. No Trend.
With 0 lags chosen from 12 by AIC
Variables
LIPC_1
LTC_1
LWPX
LPIB
Minimum T-Statistic -4.407
Achieved At 1980:03
1% Critical Value -5.770
5% Critical Value -5.280
10% Critical Value -5.020
## SX11. Identifier SEASONS is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>ib{0 to 4} seasons{<<<<
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
* a space before the ( in an option field
* a missing space before = in a SET or FRML
* a missing $ at the end of a long line which continues to the next
"
How can I solve it?
Regards;
Re: Asymmetric Exchange Rate Pass-Through
Dear Tom;
When I delete the seasons from the main file, I got the warning as "
Value 0.45026526 t-Statistic 3.24838
Standard Error 0.13861222 Signif Level 0.0014908
NA NA NA
Summary of Function of Coefficients
Value NA t-Statistic 0.00000
Standard Error NA Signif Level 1.0000000
Summary of Function of Coefficients
Value NA t-Statistic NA
Standard Error 0.07867283 Signif Level NA
## SR14. Empty Range on Series ERPT_SR."
Could you please help me? Regards.
When I delete the seasons from the main file, I got the warning as "
Value 0.45026526 t-Statistic 3.24838
Standard Error 0.13861222 Signif Level 0.0014908
NA NA NA
Summary of Function of Coefficients
Value NA t-Statistic 0.00000
Standard Error NA Signif Level 1.0000000
Summary of Function of Coefficients
Value NA t-Statistic NA
Standard Error 0.07867283 Signif Level NA
## SR14. Empty Range on Series ERPT_SR."
Could you please help me? Regards.