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

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -