Balance of Power (BOP)

get_bop(quotes, smooth_periods=14)


name type notes
quotes Iterable[Quote] Iterable(such as list or an object having __iter__()) of the Quote class or its sub-class.
Need help with pandas.DataFrame?
smooth_periods int, default 14 Number of periods (N) for smoothing. Must be greater than 0.

Historical quotes requirements

You must have at least N periods of quotes to cover the warmup periods.

quotes is an Iterable[Quote] collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.




name type notes
date datetime Date
bop float, Optional Balance of Power


See Utilities and Helpers for more information.


from stock_indicators import indicators

# This method is NOT a part of the library.
quotes = get_history_from_feed("SPY")

# Calculate 14-period BOP
results = indicators.get_bop(quotes, 14)

About Balance of Power (BOP)

Created by Igor Levshin, the Balance of Power (aka Balance of Market Power) is a momentum oscillator that depicts the strength of buying and selling pressure. [Discuss] :speech_balloon: