I wrote the code posted below, and seems to be working ok, except that the number of lags, which is needed to be specified as follows: grp.coint(s,numlag)
Here I want numlag to be called from the matrix "vl" but it only takes the default value 4, even with the code written as below.
What should be done?
Your help will be very much appreciated.
Code: Select all
%file = "C:\Desktop\Mydata.xls"
wfopen(page=Sheet1) %file
smpl 1/01/2005 1/01/2010
genr dbid = d(bid)
genr dask = d(ask)
var varl.ls 1 2 dbid dask
show varl.laglen(20,vname = vl)
close varl
var varc.ls 1 2 bid ask
close varc
group grp bid ask
grp.coint(s,vl(3))
