VECM-GARCH Model

Discussions of ARCH, GARCH, and related models
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

hi sir

I am facing this issue what it mean? and one more thing as I am working on nse stock data with exchange rate data and interest data, when I calculated the return for the stock and Exchange rate, the first cell will be empty, and for the interest rate I didnt calculate the change, simply I am using log of interest rate, In this case how I can delete the empty cell, will it effect my result if i will not delete it. Please help me
## IO9. Invalid input "2000:01:04" on line 2 while processing series Date entry 1
## IO9. Invalid input "2000:01:05" on line 3 while processing series Date entry 2
## IO9. Invalid input "2000:01:06" on line 4 while processing series Date entry 3
## IO9. Invalid input "2000:01:07" on line 5 while processing series Date entry 4
## IO9. Invalid input "2000:01:10" on line 6 while processing series Date entry 5
## IO9. Invalid input "2000:01:11" on line 7 while processing series Date entry 6
## IO9. Invalid input "2000:01:12" on line 8 while processing series Date entry 7
## IO9. Invalid input "2000:01:13" on line 9 while processing series Date entry 8
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

reference to the previous mail i am using these code for return of nse and exchnage rate
set rnse = 100* log(price of nse/price of nse {1})
set rex = 100 *log(exchange rate/exchange rate{1})
set lngsec = log(gsec)
Please unpdate me for any modification
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

That's a data file issue. Is it possible that you have an extra set of quotes on the dates?
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

Good Morning Sir, Hope you are doing well,

Sir I didn't understand the mail, but I have tried on my data to eliminate the issue, as as we know there is no continuous data due to some holiday and so there are gap in the date, when I scan the data, One dialog Box pop up and asked about the data with gap or without gap, so I selected the with gap, then I didn't get the issue. But when I create the IDs like(1,2,3... so on), its shows same issue.
and Can you provide the handbook for the RATs codes and which contain about issues which I can read and work. Like in previous mail I asked you how to delete the empty cell or row Ist to perform my analysis. Please provide me the insight.
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

Sir, I am waiting for your reply Please let me know all these things.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

As I said, it's a data file issue. If you can't figure out what the problem is, you would need to attach the data set. If you aren't using the dates, you can use a LEFT=2 option on the DATA instruction to skip the date processing.
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

Dear Sir,

Thank you for your reply, I have attached the file please check.
Attachments
data for rats.xlsx
(225.11 KiB) Downloaded 694 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

Your first column is the "ID" which causes confusion with recognizing the structure. Given that you're not using the dates, just read the data with

DATA(FORMAT=XLSX,ORG=COLUMNS,LEFT=2) 1 5619 PGSEC CPnse EX

which will skip the first two columns.
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

Dear Sir

I have run the cointegration and these are the codes and result, please take a look

@johmle(lags=2,det=constant,cv=cv)
# rnse rex lngsec

Likelihood Based Analysis of Cointegration
Variables: RNSE REX LNGSEC
Estimated from 3 to 5619
Data Points 5617 Lags 2 with Constant

Unrestricted eigenvalues and -T log(1-lambda)
Rank EigVal Lambda-max Trace Trace-95% LogL
0 6731.3952
1 0.0035 19.4957 27.3880 29.8000 6741.1430
2 0.0014 7.6144 7.8923 15.4100 6744.9502
3 0.0000 0.2779 0.2779 3.8400 6745.0891

Cointegrating Vector for Largest Eigenvalue
RNSE REX LNGSEC
-0.010002 0.040727 5.575741

According to me the result shows no cointegrating and the trace-95% is greater than the Lambda max and trace statistics.
But my question is, when I use eviews and run cointegration on price series rather than difference series, but in Rats software we use difference series but why? can it possible for you to please explain it.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

I'm confused. You run the cointegration test on the (log?) price series. You can't run a cointegration test on the differenced series---without the levels you can't detect cointegration. Yes, the results show there is no cointegration. Which means you can run models on the differences. But that has nothing to do with how you run the test.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

I'm confused. You run the cointegration test on the (log?) price series. You can't run a cointegration test on the differenced series---without the levels you can't detect cointegration. Yes, the results show there is no cointegration. Which means you can run models on the differences. But that has nothing to do with how you run the test.
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

I have three variables - the prices of NSE stock, the Exchange rate, and the Interest rate of 10-year government bonds.
then In RATs I set the data
set rnse = 100.0*(log(pnse/pnse(1))) (pnse is the price of the nse stock)
set rex = 100.0*(log(ex/ex(1))) (Ex is the rate of the INR/US dollar)
set lnIR = log(IR) (IR is the interest rate of 10 year government bonds) (@10% it is stationary at level)
@varlagselect(lags=10,crit=sbc)
#rnse rex lnIR
compute nlags = 2
@johmle(lags=2,det=constant,cv=cv)
#rnse rex lnIR

I have used these codes, Now tell me am I going right?
but I have doubts as I said when I run co-integration in EVIEWS software, I run on log prices but in RAts why do we use difference series for cointegration? Please Help me in decoding things.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

No. That's just wrong. Where did you get the idea that you run the cointegration test on the differences? When you find that there is no cointegration, you can then safely run the models on the differences, but not until then.
faaequah13
Posts: 36
Joined: Wed Jul 01, 2020 10:33 am

Re: VECM-GARCH Model

Unread post by faaequah13 »

Dear sir

theoretically I know, but I am not getting in Codes, I got these codes for the example(which I attached here), Please Sir I request you kindly help me in my analysis. I request you kindly provide me a codes of how we estimate Johanson cointegration. and In the absence of cointegration how we go with different VAR models. and If cointegration persist how We go for VECM. Please Sir help me to grasp the coding information.
Attachments
Example of some of the calculations done in Pardo and Torro.docx
(21.93 KiB) Downloaded 685 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: VECM-GARCH Model

Unread post by TomDoan »

These are *not* returns:

*
* Normalize both to 100 * log relative to the first entry
*
set logdjia = 100.0*(log(djia/djia(1)))
set logrut = 100.0*(log(russell2000/russell2000(1)))

(It's DJIA(1) which is the 1st entry of the series, not DJIA{1} which is the first lag). It you look at the graph of the log stock indexes, the point of that is to make both (log) series start at 0. Note that there is no reason for standardizing on the first entry other than for that graph.
Post Reply