Results of linreg does not match talib.LINEARREG()
See original GitHub issueWhich version are you running? The lastest version is on Github. Pip is for major releases.
import pandas_ta as ta
print(ta.version)
0.2.45b0 Upgrade.
$ pip install -U git+https://github.com/twopirllc/pandas-ta
Describe the bug I compared the results of ta.linreg() and talib.LINEARREG(). There is a significant difference. Are you doing it differently? For comparison, talib.LINEARREG() matches what is on tradingview (Pinescript linreg function). This is commonly used for the histogram of the TTM squeeze indicator
To Reproduce df[“hist_talib”] = talib.LINEARREG(df[“donchian_midline”], timeperiod=20) df[“hist_pandas_ta”] = ta.linreg(df[“donchian_midline”], length=20)
Expected behavior I except the output of ta.linreg to match the output of talib.LINEARREG and pinescript linreg function
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
how does talib.LINEARREG works? - Stack Overflow
I'm using TA-Lib to calculate technical indicators, but I don't understand the LINEARREG function where only one input array(called close price) ...
Read more >Regression coefficients do not match conditional means
As can be seen in this jupyter notebook, I cannot get these two methods to match. How come the linear regression results do...
Read more >Incorrect output is returned when you use the Linear ...
Discusses a problem in which the incorrect output is returned when you use Linear Regression (LINEST) function in Excel.
Read more >Python Examples of talib.LINEARREG - ProgramCreek.com
The following are 5 code examples of talib.LINEARREG(). You can vote up the ones you like or vote down the ones you don't...
Read more >Interpret Linear Regression Results - MATLAB & Simulink
Fit a linear regression model by using fitlm . lm = fitlm(X,MPG). lm = Linear regression model: y ~ 1 + x1 +...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just tried the development build again, and it works perfectly. The results match with both TA Lib and TradingView. Probably didn’t work the first time because of issues with Colab.
Once again, thanks for your time and energy working on this great library
Thank you