I have found there could be a problem in the code, maybe it’s due to the different MATLAB version, I’m not quite sure. Here is the thing: running the CreateData.m, on this line

data = cn.fetch(s, ‘Close’, StartDate, EndDate);

It doesn’t work, so I changed it to data = fetch(cn, s, ‘Close’, StartDate, EndDate);

and no error occurred, however, the date returned are not what we defined as from 2014/01/01-2014/02/01, as I checked it’s actually 2006/07/07-2006/08/07. And I changed the format of the string of StartDate and EndDate as follows: