pyfinance icon indicating copy to clipboard operation
pyfinance copied to clipboard

it does not make sense when calling the property "rsq" and "rsq_adj"

Open zhangda425 opened this issue 5 years ago • 0 comments

First, thanks for fixing the problem and updating the package to 1.2.5. When I use the newest version, I run into the following result. it seems to make no sense.

data = {'A':[2,3,4,5,6],'B':[10,11,12,13,14]} df = pd.DataFrame(data) rolling = ols.RollingOLS(y=df['B'], x=df['A'], window=3,has_const=False,use_const=False) rolling.rsq rolling.rsq_adj

the result is array([938.58741603, 868.32596507, 801.06451411]) array([-624.05827735, -577.21731005, -532.37634274])

it should in the interval [0,1]

zhangda425 avatar Mar 18 '19 14:03 zhangda425