1
import statsmodels.api as sm
xdat = rets['EUROSTOXX']
xdat = sm.add_constant(xdat)
ydat = rets['VSTOXX']
model = sm.OLS(y=ydat,x=xdat).fit()
주제에 설명 된대로 오류가 나타나는 이유를 이해할 수 없습니다. 다음은 documentation of OLS에 따르면 RETSPython OLS 모델 : __init __() missing 1 필수 위치 인수 : 'endog'
Out[105]:
EUROSTOXX VSTOXX
2014-12-23 0.011835 -0.039307
2014-12-24 -0.002449 0.000000
2014-12-29 0.000160 0.121598
2014-12-30 -0.015574 0.048998
2014-12-31 0.003336 0.000000