Page 4 of 5
Re: VECM-GARCH Model
Posted: Wed May 17, 2023 5:32 am
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
Re: VECM-GARCH Model
Posted: Wed May 17, 2023 6:07 am
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
Re: VECM-GARCH Model
Posted: Wed May 17, 2023 7:20 am
by TomDoan
That's a data file issue. Is it possible that you have an extra set of quotes on the dates?
Re: VECM-GARCH Model
Posted: Thu May 18, 2023 12:42 am
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.
Re: VECM-GARCH Model
Posted: Sat May 20, 2023 2:43 am
by faaequah13
Sir, I am waiting for your reply Please let me know all these things.
Re: VECM-GARCH Model
Posted: Sat May 20, 2023 10:54 pm
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.
Re: VECM-GARCH Model
Posted: Mon May 22, 2023 1:46 am
by faaequah13
Dear Sir,
Thank you for your reply, I have attached the file please check.
Re: VECM-GARCH Model
Posted: Mon May 22, 2023 10:37 pm
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.
Re: VECM-GARCH Model
Posted: Tue May 23, 2023 6:00 am
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.
Re: VECM-GARCH Model
Posted: Tue May 23, 2023 7:46 am
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.
Re: VECM-GARCH Model
Posted: Tue May 23, 2023 7:47 am
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.
Re: VECM-GARCH Model
Posted: Tue May 23, 2023 11:45 pm
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.
Re: VECM-GARCH Model
Posted: Wed May 24, 2023 11:40 am
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.
Re: VECM-GARCH Model
Posted: Wed May 24, 2023 11:52 pm
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.
Re: VECM-GARCH Model
Posted: Thu May 25, 2023 8:20 am
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.