Standard Deviation Channels
get_stdev_channels(quotes, lookback_periods=20, standard_deviations=2)
||Iterable[Quote]||Iterable(such as list or an object having
• Need help with pandas.DataFrame?
||int, Optional, default 20||Size (
||int, default 2||Width of bands. Standard deviations (
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.
- This method returns a time series of all available indicator values for the
StdevChannelsResultsis just a list of
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- Up to
N-1periods will have
Nonevalues since there’s not enough data to calculate.
Repaint warning: Historical results are a function of the current period window position and will fluctuate over time. Recommended for visualization; not recommended for backtesting.
||float, Optional||Linear regression line (center line)|
||float, Optional||Upper line is
||float, Optional||Lower line is
||bool||Helper information. Indicates first point in new window.|
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 StdDevChannels(20,2) results = indicators.get_stdev_channels(quotes, 20,2)
Alternative depiction for full quotes variant
If you specify
None for the
lookback_periods, you will get a regression line over the entire provided
About Standard Deviation Channels
Standard Deviation Channels are based on an linear regression centerline and standard deviations band widths. [Discuss]