Pandas TA: A complete Guide
HTML-код
- Опубликовано: 29 июн 2024
- We cover the pandas-ta library, how to calculate various technical indicators, how to create strategies, how to use multi-processing, etc.
⭐ Code:
github.com/ChadThackray/panda...
Timestamps:
00:00 - Intro
01:03 - Fetching data from yfinance
03:56 - Pandas-TA documentation
06:42 - Calling TA functions directly
10:12 - Using df.ta accessor
15:19 - Using strategy objects to calculate multiple indicators
18:18 - Misc. Features, Multi-processing, column naming, etc.
Amazing, love what you are doing. Can't wait for the next one :)
Dear Chad, Thank you for sharing and teaching us. Greetings.
I learned a lot from this video. Best video I have seen today 😍
I love your videos. Thanks.
Thanks for removing the clock. It was a source of distraction. Now I can pay better attention to the lecture.
Very nicely made video to explain the library. Thanks you so much
Thank you so much this helped a lot!!!! You saved my life
This method works perfectly .. thanks for sharing ;)
Precise explanation. Thanks a lot
thank you very much for your videos - keep going please
Muy buena Información!!!!
Nice... This could save me a tonne of time.
lov ya bro !!!
thanks for sharing this. very useful video indeed. is it possible to fetch the commodities data and the derivatives data.
I do love pandas 🐼
Me too! Keep up the good work chad :)
You do excellent job Chad ! Your videos are very useful. However, I would like to ask one question. Why do I get from following two functions completely different results? Pandas-TA result seems to be wrong...
a = ta.trend.STCIndicator(close=data["close"], window_fast=12, window_slow=26, cycle=10, smooth1=3, smooth2=3, fillna=True).stc()
b = pandas_ta.stc(close=data["close"],tclen=10, fast=12, slow=26 ,factor=0.5)
Is it in the parameters smooth and factor?
Yes you'll want to make sure that the parameters are the same. In this example I think your smoothing value is off.
If that's still not right then you'll want to check the code between the two repos and see if there's a difference in methodology
the close price passed into ta should be 'Close' or 'Adj Close' ?
thanks
For once, the software is actually really useful
Is the underlying data pulled from Yahoo Finance?
Is there any plot function built-in to easily plot the calculated indicators?
Not that I'm aware of. But it's only one line in matplotlib or plotly.
Hi Chad, I want to run the ta functions on a df that is not from yfinance. Is that possible? If so, what all do I need to take care of
Should be exactly the same. Just make sure your dataframe looks like the yfinance one
I tried to import from yfinance exactly as shown above with df.ta.ticker("SPY",...etc) and got an error message "Yahoo has again changed data format, yfinance now unsure which key(s) is for decryption:" plus a page full of stuff -no dataframe.
Update your version of yfinance. Looks like the issue is resolved now if you check the github issues