1
我想用regstat之类的东西来回归测试版的coffecients。我的Matlab代码看起来像:Matlab回归返回beta coffecient不正确?
%get stock
sym = 'F'
%calculaltes returns with output of standard Open High Low Close
[o,h,l,clS]=YahooGetData(sym, priords, now,'d')
y = diff(clS)
%index like S&P 500
symIdx='^GSPC'
[o,h,l,clI]=YahooGetData(sym, priords, now,'d')
x = diff(clI)
mdl = regstats(x,y)
无论我使用什么股票代码,我的beta版咖啡总是返回1和0。这有什么理由吗?你觉得我做错了什么?我也使用polyfit获得相同的结果。
感谢
如果这是Matlab,那么它不是R. – 2014-11-04 20:34:52