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.
已解决,dataframe中有一个nan,dropna()后没有问题了