Matlab regression returns beta coffecient not right? -


I am trying to caclulate beta coffees with regression using something like regastat. My matlab code likes:

% get the stock = sysm, now, 'd') y = difference (CLS)% index such as S & P 500 symIdx = '^ GSPC' [ O, H, L, CLI] = YahooGetData (SIM, Prior, now 'D) x = difference (CLI) mdl = regstats (x, y)

My beta coffee maker is always 1 And return 0, no matter what stock I use. Is there any such reason? Do you think I am doing something wrong? I get similar results using polyfi. I

thanks

stupid big , I changed it with:

  retIdx, o, h, l, cli] = yahugetadata (symIdx, priords, now, 'd')  


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -