-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linreg returns a wrong value #676
Comments
Hello @monkey0619, Thanks for sharing a potential solution for
Kind Regards, |
You did not specify which library or trading platform it is incongruent with. Was it TA-Lib, TradingView, ToS, IBKR, MT4/5, Sierra, ... ? Note: It is really hard to easily test anything but TA-Lib. TradingView requires a manual approach. Any others are even more cumbersome to compare. 😭 Thanks |
Thank you, KJ, it works for me. |
Which version are you running? The lastest version is on Github. Pip is for major releases.
0.3.14b0
Do you have TA Lib also installed in your environment?
No
Have you tried the development version? Did it resolve the issue?
Not tried
Describe the bug
A wrong return. I checked the linreg help and found the following calculation formula.
return m * (length - 1) + b
The actual return is m * (length - 2) + b with coefficient of 10.0952380952381 and intercept of 11.1666666666667 for the first return 71.738095. In this case, length is 8 and (length - 2) equals 6.
To Reproduce
Screenshots
Additional context
Add any other context about the problem here.
Thanks for using Pandas TA!
The text was updated successfully, but these errors were encountered: