Skip to content

Markets

Functions

getData

getData(tickers: Union[str, List[str]], start_date: str = None, end_date: str = None, period: str = '1mo', interval: str = '1d') -> pd.DataFrame

Retrieve data using yfinance library for specified tickers.

Parameters:

Name Type Description Default
tickers str or list

symbol or list of symbols

required
start str

start date, by default None

required
end str

end date, by default None

required
period str

period, by default '1mo' valid periods: 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max

'1mo'
interval str

interval, by default '1d', max 60 days valid intervals: 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo

'1d'

Returns:

Type Description
DataFrame

DataFrame with OHLC[A]V (Open, High, Low, Close, Adj Close, Volume).

getTicker

getTicker(ticker: str) -> yf.Ticker

Retrieve ticker object using yfinance library.

Parameters:

Name Type Description Default
ticker str

symbol

required

Returns:

Type Description
Ticker

Ticker object