[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-finance
Subject:    Re: [R-SIG-Finance] Regarding significance of "Season" parameter
From:       gunjan narulkar <gunjan_narulkar () yahoo ! com>
Date:       2013-06-05 10:48:19
Message-ID: 1370429299.27096.YahooMailNeo () web162402 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]

Hello

My apologies for the inconvenience and thanks a lot for the answers provided!

For 1.2 and 1.3, one common theme was whether the season parameter depended on \
periodogram of the series' involved or whether it is the frequency at which the data \
is collected. The details are below:

Sample Data: (Total 62 data points)

Date logdiff logexch 
2003-Jan -1.07173 4.77811 
2003-Feb -1.07496 4.78164 
2003-Mar -1.09263 4.78582 
2003-Apr -1.08933 4.79206 
2003-May -1.09413 4.76149 
2003-Jun -1.09396 4.71402 
2003-Jul -1.09613 4.69993 
2003-Aug -1.09630 4.69711 
2003-Sep -1.10494 4.67488 
2003-Oct -1.08094 4.66070 
2003-Nov -1.09220 4.69236 
Commands used for 1.1:
m1co1 = ca.jo(cor2,type="eigen",ecdet="const",K=2,season=12,spec="transitory")

m2co1 = ca.jo(cor2,type="eigen",ecdet="const",K=2,spec="transitory")

(both resulted in order of cointegration =1 at 5% significance level)

Further, I used conversion command to utilize the capability of VAR for prediction:
vecm.lvl.m1 = vec2var(m1co1,r=1)


and finally used predict(vecm.lvl.m1) command to get the forecast for which I found \
out the MAPE manually for both the m1co1 and m2co1 models and got the MAPE to be \
lesser for m2co1 as compared to m1co1. So the question is whether to actually use \
season parm or not..

Finally, 1.2:
m1co1 = ca.jo(cor2,type="eigen",ecdet="const",K=2,season=2,spec="transitory")
Error in while (nrow(dums) < N) { : argument is of length zero
Now, I dont know whether theoratically 2 is a "correct" value to be passed or not, \
but it does give above error.

I'm sorry if above doesn't help in improving understanding of my doubts. Thanks again \
for the explanation, it is just enough helpful so as to allow me to carry on with the \
work.

Gunjan Narulkar,
Ist Year M. Mgmt., DOMS,
Indian Institute of Science
Contact: +91-99007-40404
LinkedIn: in.linkedin.com/pub/gunjan-narulkar/19/a3b/521


________________________________
 From: Matthieu Stigler <matthieu.stigler@gmail.com>

Cc: "r-sig-finance@r-project.org" <r-sig-finance@r-project.org> 
Sent: Wednesday, June 5, 2013 1:22 PM
Subject: Re: [R-SIG-Finance] Regarding significance of "Season" parameter



Hi

This is the right forum to ask this, not sure though it is the right form ;-) You are \
asking here many questions, some of which cannot be answered without reproducible \
code. So let me just answer 1.1 and 2:

1.1: Not the seasonal components refer to deterministic seasonality, not stochastic. \
So this is nto the same as ARIMA vs SARIMA, since SARIMA concerns stochastic \
seasonality. There have been some papers on seasonal cointegration (what corresponds \
                to SARIMA), but not very popular, and not implemented in R afaik.
1.2/1.3: not clear or no code to answer

2: yes, you are right, ecdet="const", restricts the constant to enter the coint \
relationship. 

Best

Matthieu






Hi,
> 
> I'm trying to learn about cointegration, specifically about how to use "ca.jo" for \
> finding the cointegration basis. The data is that of FX rates and M1 supply \
> difference. I need help understanding the below two points: 
> 1. Seasonal variables: 
> 
> -> What is the importance of season parameter apart from seemingly obvious \
> explanation in the documentation; in other words, should it be understood as \
> equivalent of Seasonal ARIMA vs ARIMA where we take care of the seasonal unit \
> roots?  
> -> Should the parameter be set to the value at which the Y_t under question is \
> sampled? Or should it be based on some common frequency derived from individual Y_t \
> component series's periodicity as found from their periodogram (spectrum command in \
> R)? 
> -> Should the season paramater must be greater then 2? As by spectrum of M1 and FX \
> rate series, I was getting the prominent frequencies for both variables as 2 and \
> its multiples, but got below error, which got resolved as soon as I used anything \
> >2: 
> "Error in while (nrow(dums) < N) { : argument is of length zero"
> 
> Background: I tried checking for cointegration between two monthly series, taking \
> the "season" parameter as 12 (as I had monthly data) first time and without having \
> any season parameter the second. The order of cointegration in both the cases was \
> 1. But further, when I tried fitting VECM and using vec2var created 6 months ahead \
> forecasts and calculated MAPE (Mean Absolute Percentage Error), the MAPE for ca.jo \
> output without season parm specified was better then with season parameter - which \
> lead me to the above confusions. f
> 
> 2. ecdet paramter: 
> The awesome book as well as documentation describe this parameter nicely. But when \
> I use it, the message that comes in the output is a bit confusing: 
> > cv1.m1.bop = ca.jo(cor2,type="trace",ecdet="const",K=2,season=12,dumvar=bop)
> > summary(cv1.m1.bop) 
> 
> 
> ###################### 
> # Johansen-Procedure # 
> ###################### 
> 
> Test type: trace statistic , without linear trend and constant in cointegration 
> .
> .
> .
> 
> The confusion is that I'm interested in finding out presence of "restricted \
> constant", so I used "ecdet='const'". Am I correct in doing so? 
> Apologies if this is not the right forum for asking these questions and also for \
> the long mail. 
> Thanks & Regards,
> 
> Gunjan Narulkar,
> Ist Year M. Mgmt., DOMS,
> Indian Institute of Science
> Contact: +91-99007-40404
> LinkedIn: in.linkedin.com/pub/gunjan-narulkar/19/a3b/521
> 
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
> 
	[[alternative HTML version deleted]]



_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic