示例#1
0
def get_market_losers(*args, **kwargs):
    """
    MOVED to iexfinance.stocks.get_market_losers
    """
    import warnings
    warnings.warn(WNG_MSG, ("get_market_losers", "stocks.get_market_losers"))
    return stocks.get_market_losers(*args, **kwargs)
示例#2
0
 def get_losers(self):
     """
     Get lower values:
         ticker
         price
         $ & % change
         volume
     Save to excel
     """
     print("[SS]-[API] Getting losers...")
     losers_df = get_market_losers(token=self.api_key,
                                   output_format="pandas")
     return StockInfo(losers_df)
示例#3
0
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
示例#4
0
    def test_market_losers(self):
        li = get_market_losers()

        assert isinstance(li, pd.DataFrame)
        assert len(li) == pytest.approx(10, 1)
 def test_market_losers(self):
     li = get_market_losers()
     assert len(li) == pytest.approx(21, 1)
示例#6
0
def get_market_losers(*args, **kwargs):
    return stocks.get_market_losers(*args, **kwargs)
示例#7
0
def get_market_losers(*args, **kwargs):
    import warnings
    warnings.warn(WNG_MSG % "get_market_losers")
    return stocks.get_market_losers(*args, **kwargs)