Comments (1)
Hello @ibrahimmina,
Pandas TA is focused primarily on TA Lib which is the de facto library of indicators and testing indicators against it is relatively easy. TradingView (TV) is secondary and is ubiquitous. Running TV tests are possible, but require a paid TV account and some manual work before exporting from TV.
On the other hand, all the other trading and financial data platforms like Think or Swim, Trade Station, Yahoo Finance, et al are black boxed systems where the exportation of both ohlcv and indicator values range from cumbersome to impossible. Without easily exportable data, comparing hundreds of indicator values via charts from these platforms is not only extremely slow to manually do but also error prone. Thus these platforms will not be covered on a free basis. However Pandas TA is open source so you or anyone else are welcome to modify or extend the functionality however they want and submit a pull request if they would like it included.
I have compared the output with Yahoo Finance and it seems that the numbers are mismatching
You passed all of ohlcv into ad.
stock.ta.ad(high=stock['high'], low=stock['low'], close=stock['close'],volume=stock['volume'], open_=stock['Open'])
However ad is one of the few indicators where one or more Series is option-able. In particular, ad does not require the open for it's calculation . So it is possible that Yahoo Finance also does not include open values in their calculation, only hlcv. But I don't know for sure. 🤷🏼♂️ So you could try excluding open like so:
stock.ta.ad(high=stock['high'], low=stock['low'], close=stock['close'], volume=stock['volume'])
Since you are calling ad from the DataFrame Extension .ta.ad(), you can simplify your code as follows:
stock.ta.ad()
# or
stock.ta.ad(append=True) # if you want/need to append the results to the stock DataFrame
Additionally, I noticed that you are pulling data from Polygon which may or may not be an exact copy of Yahoo Finance data. If they are different, then you are comparing apples with oranges which is common mistake.
Finally, it is good practice to read the indicator documentation, help(ta.ad)
, and/or view the source code and try all possible variations if the default parameters do not return as expected before submitting a Bug issue.
Kind Regards,
KJ
from pandas-ta.
Related Issues (20)
- Simple bug on downloading data using example Backtesting with vectorbt HOT 4
- Having trouble attempting to "import pandas_ta as ta" HOT 2
- NATR in non TA-lib mode HOT 1
- How To Test TMO Indicator HOT 8
- Adjusted Close vs Close HOT 4
- Pythonv3.12 support HOT 2
- Indicators using moving averages variable does not pass kwargs to ma(mamode, close, length=length) HOT 1
- Attribute error when I remove a specific group from dataframe HOT 2
- Fix for RMA - adjust=False
- natr behaves the same as atr(percent=True)
- ta.cci returns entire original dataframe if there aren't enough rows for the period value HOT 1
- outstanding tickets for next release? HOT 3
- Weird behaviour in RSI moment indicator on development branch HOT 9
- Failing tests HOT 3
- EVERYONE: Removing the 'fillna' keyword option if there is no opposition!
- can you support smc/bos/choch smart money indicator HOT 2
- The Jurik Moving Average (JMA) is a proprietary indicator, How likely is it to be close to the actual implementation as it looks quite like a closely guarded secret? HOT 4
- StochRSI on development branch HOT 3
- ta.Category list value gets truncated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas-ta.