Stuart, thanks for your contribution. It Looks to me that this is not able for real live trading because the "reg2" value "res" (of the egcitest) is changing its history with every new datapoint. If for example the res value at Bar 8 is -.9 for bar 7 the res value might be +0.8 for bar 7 at bar 20. Do you know a solution for this issue?
Stuart, I am having problems with downloading the intra-day data from the access db. I receive the error "??? Undefined function or method 'getMinuteDataFromDB' for input arguments of type 'char'."
Is there anyway to fix this?
I do not think there is a forward bias, but it indeed is a kind of curve-fitting based on historical data. I did simulated trading based on this strategy on a daily and intra-day basis, and it has been a losing one.
When calculating the trading ratio should the first leg qty be calculated as -1/reg1.coeff(2) instead of just -reg1.coeff(2)? Since the second leg is fixed at 1 we are effectively dividing through by the coeff of the second leg or have I miss interpreted the script... (This is in the pairs.m function)
When calculating the trading ratio should the first leg qty be calculated as -1/reg1.coeff(2) instead of just -reg1.coeff(2)? Since the second leg is fixed at 1 we are effectively dividing through by the coeff of the second leg or have I miss interpreted the script...
for those who got this kind of error messages: "Error using ==> Lagmatrix at 25 lagmatrix: wrong # of input arguments," you must be using the MFEToolbox which calls in the lagmatrix function from the USCD toolbox. From R2011a or -b, Matlab has introduced a built-in function with the same name. That should be why.
I am having problems running the code for some reason. I get errors trying to run the egcitest(series). "Error using ==> Lagmatrix at 25 lagmatrix: wrong # of input arguments. If anyone could help, it would be greatly appreciated.
Expecting to see the use of Johansen procedure in the determination of cointegrating relationship in a multiple-assets stat arb trading environment. The pairs trading part of the webinar still focused on two series and EG -- no big change from previous webinar.
Great contribution! This actually gave me the nugde to write a thesis about the subject. However, I struggle with accessing the odbc material on win7 x64, r2011a. I have spent too much time on troubleshooting now, I found some discussions online but never an resolution. I was hoping someone in here have had the same issue, and have resolved it. Thanks!