def get_market_most_active(*args, **kwargs): """ MOVED to iexfinance.stocks.get_market_most_active """ import warnings warnings.warn(WNG_MSG, ("get_market_most_active", "stocks.get_market_most_active")) return stocks.get_market_most_active(*args, **kwargs)
def data_parse(): data = get_market_gainers(token=iex_key) datax = get_market_losers(token=iex_key) datay = get_market_most_active(token=iex_key) symbol = [data[0]['symbol'], data[1]['symbol'], data[2]['symbol']] df = yf.download(symbol, period='6mo', interval='1d', group_by='ticker', auto_adjust=True) data1 = df[symbol[0]] data2 = df[symbol[1]] data3 = df[symbol[2]] return data, datax, datay, data1, data2, data3, symbol
def test_market_most_active(self): li = get_market_most_active() assert isinstance(li, pd.DataFrame) assert len(li) == pytest.approx(10, 1)
def test_market_most_active(self): li = get_market_most_active() assert len(li) == pytest.approx(21, 1)
def get_market_most_active(*args, **kwargs): return stocks.get_market_most_active(*args, **kwargs)
def get_market_most_active(*args, **kwargs): import warnings warnings.warn(WNG_MSG % "get_market_most_active") return stocks.get_market_most_active(*args, **kwargs)