使用statsmodels.api 的OLS回归得到的结果是空的
代码
x=df_合并[['指数超额收益率']]
x = sm.add_constant(x)
reg = sm.OLS(df_合并['超额收益率'],x).fit()
display(reg.summary())
结果
OLS Regression Results都是nan
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.