Technical Indicators

technical_indicators.RSI(ticker, data, length)

Calculate relative strength index

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • length (int) –

    the window

Returns:
  • List[float]

    list with float RSI

technical_indicators.SMA(ticker, data, length)

Calculate simple moving average

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • length (int) –

    the window

Returns:
  • List[float]

    list with float SMA

technical_indicators.EMA(ticker, data, length)

Calculate exponential moving average

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • length (int) –

    the window

Returns:
  • List[float]

    list with float EMA

technical_indicators.MFI(ticker, data, length)

Calculate money flow index

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • length (int) –

    the window

Returns:
  • List[float]

    list with float MFI

technical_indicators.MACD(ticker, data, fast, slow)

Calculate moving average convergence divergence

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • fast (int) –

    the fast (short) window

  • slow (int) –

    the slow (long) window

Returns:
  • Dict[str, List[float]]

    dict with string key specifying MACD details and value list with float prices

technical_indicators.BB(ticker, data, length, std=1, band='')

Calculate Bollinger bands

Parameters:
  • ticker (str) –

    a string ticker

  • data (List[Dict[str, Dict[str, float]]]) –

    data as provided from the OHLCV data function

  • length (int) –

    the window

  • std (float, default: 1 ) –

    the standard deviation width of the bollinger bands

Returns:
  • Dict[str, List[float]]

    dict with string keys of upper, lower, and mid matching a list with float band prices