Example Indicators

Custom Average Directional Index - ADX https://www.investopedia.com/terms/a/adx.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.adx.IndicatorADX(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.adx                 import IndicatorADX
ind = IndicatorADX(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.adx.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Average True Range - ATR

https://www.investopedia.com/terms/a/atr.asp

Volatility

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.atr.IndicatorATR(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.atr                 import IndicatorATR
ind = IndicatorATR(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.atr.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom BollingerBands

https://www.investopedia.com/terms/b/bollingerbands.asp

Overlap

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.bollinger_bands.IndicatorBollingerBands(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.bollinger_bands                 import IndicatorBollingerBands
ind = IndicatorBollingerBands(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.bollinger_bands.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Chaikin Oscillator

https://www.investopedia.com/terms/c/chaikinoscillator.asp https://www.investopedia.com/articles/active-trading/ 031914/understanding-chaikin-oscillator.asp

Volume

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.chaikin_osc.IndicatorChaikinOSC(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.chaikin_osc                 import IndicatorChaikinOSC
ind = IndicatorChaikinOSC(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.chaikin_osc.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Chaikin

https://www.investopedia.com/terms/c/chaikinoscillator.asp https://www.investopedia.com/articles/active-trading/ 031914/understanding-chaikin-oscillator.asp

Volume

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.chaikin.IndicatorChaikin(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.chaikin                 import IndicatorChaikin
ind = IndicatorChaikin(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.chaikin.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Exponential Moving Average

https://www.investopedia.com/terms/e/ema.asp

Overlap

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.ema.IndicatorEMA(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.ema                 import IndicatorEMA
ind = IndicatorEMA(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.ema.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Moving Average Convergence Divergence - MACD

https://www.investopedia.com/terms/a/adx.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.macd.IndicatorMACD(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.macd                 import IndicatorMACD
ind = IndicatorMACD(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.macd.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Money Flow Index - MFI

https://www.investopedia.com/terms/m/mfi.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.mfi.IndicatorMFI(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.mfi                 import IndicatorMFI
ind = IndicatorMFI(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.mfi.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Momentum - MOM

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.mom.IndicatorMOM(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.mom                 import IndicatorMOM
ind = IndicatorMOM(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.mom.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Normalized Average True Range - NATR

https://www.investopedia.com/terms/a/atr.asp

Volatility

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.natr.IndicatorNATR(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.natr                 import IndicatorNATR
ind = IndicatorNATR(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.natr.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom On Balance Volume

https://www.investopedia.com/terms/o/onbalancevolume.asp

Volume

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.obv.IndicatorOnBalanceVolume(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.obv                 import IndicatorOnBalanceVolume
ind = IndicatorOnBalanceVolume(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.obv.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Price of Rate of Change - ROC

https://www.investopedia.com/terms/p/pricerateofchange.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.roc.IndicatorROC(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.roc                 import IndicatorROC
ind = IndicatorROC(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.roc.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Relative Strength Index - RSI

https://www.investopedia.com/terms/r/rsi.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.rsi.IndicatorRSI(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.rsi                 import IndicatorRSI
ind = IndicatorRSI(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.rsi.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Stochastics - STOCHF

https://www.investopedia.com/terms/s/stochasticoscillator.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.stochf.IndicatorSTOCHF(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.stochf                 import IndicatorSTOCHF
ind = IndicatorSTOCHF(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.stochf.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Stochastics - STOCH

https://www.investopedia.com/terms/a/adx.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.stoch.IndicatorSTOCH(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.stoch                 import IndicatorSTOCH
ind = IndicatorSTOCH(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.stoch.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom True Range - TRANGE

https://www.investopedia.com/terms/a/atr.asp

Volatility

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.trange.IndicatorTRANGE(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.trange                 import IndicatorTRANGE
ind = IndicatorTRANGE(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.trange.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Williams Percent R Indicator that uses Open instead of Close

https://www.investopedia.com/terms/w/williamsr.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.williamsr_open.IndicatorWilliamsROpen(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.williamsr_open
    import IndicatorWilliamsROpen
ind = IndicatorWilliamsROpen(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.williamsr_open.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Williams Percent R Indicator

https://www.investopedia.com/terms/w/williamsr.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.williamsr.IndicatorWilliamsR(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.williamsr import IndicatorWilliamsR
ind = IndicatorWilliamsR(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.williamsr.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Weighted Moving Average

https://www.investopedia.com/articles/technical/060401.asp

Overlap

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.indicators.wma.IndicatorWMA(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.indicators.wma                 import IndicatorWMA
ind = IndicatorWMA(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.indicators.wma.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

V1 Indicator Examples

Custom Williams Percent R Indicator

https://www.investopedia.com/terms/w/williamsr.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.mocks.example_indicator_williamsr.ExampleIndicatorWilliamsR(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.mocks.example_indicator_williamsr                 import ExampleIndicatorWilliamsR
ind = ExampleIndicatorWilliamsR(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.mocks.example_indicator_williamsr.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Custom Williams Percent R Indicator that uses Open instead of Close

https://www.investopedia.com/terms/w/williamsr.asp

Momentum

Supported environment variables

# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
class analysis_engine.mocks.example_indicator_williamsr_open.ExampleIndicatorWilliamsROpen(**kwargs)[source]
get_configurables(**kwargs)[source]

helper for setting up algorithm configs for this indicator and programmatically set the values based off the domain rules

from analysis_engine.mocks.example_indicator_williamsr_open                 import ExampleIndicatorWilliamsROpen
ind = ExampleIndicatorWilliamsROpen(config_dict={
        'verbose': True
    }).get_configurables()
Parameters:kwargs – keyword args dictionary
process(algo_id, ticker, dataset)[source]

Derive custom indicator processing to determine buy and sell conditions before placing orders. Just implement your own process method.

Please refer to the TA Lib guides for details on building indicators:

Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – dictionary of pandas.DataFrame(s) to process
reset_internals()[source]
analysis_engine.mocks.example_indicator_williamsr_open.get_indicator(**kwargs)[source]

Make sure to define the get_indicator for your custom algorithms to work as a backup with the sa.py tool… Not anticipating issues, but if we do with importlib this is the backup plan.

Please file an issue if you see something weird and would like some help: https://github.com/AlgoTraders/stock-analysis-engine/issues

Parameters:kwargs – dictionary of keyword arguments

Indicator Utilities

Algo data helper for mapping indicator category to an integer label value for downstream dataset predictions

analysis_engine.indicators.get_category_as_int.get_category_as_int(node, label=None)[source]

Helper for converting feature labels to numeric values

Parameters:node – convert the dictionary’s category string to the integer mapped value

Indicator Processor

  • v1 Indicator type: supported
    Binary decision support on buys and sells This is like an alert threshold that is on or off
  • v2 Indicator type: not supported
    Support for buy or sell value range This is like an alert threshold between a lower and upper bound
class analysis_engine.indicators.indicator_processor.IndicatorProcessor(config_dict, config_file=None, ticker=None, label=None, verbose=False, verbose_indicators=False)[source]
build_indicators_for_config(config_dict)[source]

Convert the dictionary into an internal dictionary for quickly processing results

Parameters:config_dict – initailized algorithm config dictionary
get_indicators()[source]
get_label()[source]
get_last_ind_obj()[source]
get_latest_report(algo_id=None, ticker=None, dataset=None)[source]

Return the latest report as a method that can be customized by a derived class from the IndicatorProcessor

Parameters:
  • algo_id – optional - string - algo identifier label for debugging datasets during specific dates
  • ticker – optional - string - ticker
  • dataset – optional - a dictionary of identifiers (for debugging) and multiple pandas pd.DataFrame objects. Dictionary where keys represent a label from one of the data sources (IEX, Yahoo, FinViz or other). Here is the supported dataset structure for the process method:
get_num_indicators()[source]
process(algo_id, ticker, dataset)[source]
Parameters:
  • algo_id – string - algo identifier label for debugging datasets during specific dates
  • ticker – string - ticker
  • dataset – a dictionary of identifiers (for debugging) and multiple pandas pd.DataFrame objects. Dictionary where keys represent a label from one of the data sources (IEX, Yahoo, FinViz or other). Here is the supported dataset structure for the process method: