Does Yahooquery include moving average data similar to yfinance?

282 Views Asked by At

I'm in the process of evaluating yahooquery as replacement for yfinance in python to pull various data for a large set of tickers. I've used yfinance for quite some time, but it takes awhile to run. Yfinance is also broken at the moment for some of the data due to (I believe) encryption changes that were recently implemented by yahoo. I'm a good ways through checkout and I'm able to pull quite a bit of data quickly using yahooquery, but I've not located simple moving average data when researching or even poking into the retrievable data. This seems like it should be a pretty standard request for a stock query tool, and it's basically a one liner in yfinance after everything else is set up. I realize I could likely pull all the raw data with yahooquery over an interval and calculate the moving average. I am hoping yahooquery handles this already. Any help with yahooquery moving averages would be appreciated.

1

There are 1 best solutions below

0
Alessandro Gianfelici On

as far as I know yahooquery doen't implement the moving average. You could consider using TA-lib for that:

import talib as ta
df['MovingAverage'] = ta.SMA(df['Close'], timeperiod=5)

where df is the price time series you got from yahooquery.