Fractal Chaos Bands (FCB)

get_fcb(quotes, window_span=2)

Parameters

name type notes
quotes Iterable[Quote] Iterable of the Quote class or its sub-class.
See here for usage with pandas.DataFrame
window_span int Fractal evaluation window span width (S). Must be at least 2. Default is 2.

The total evaluation window size is 2×S+1, representing ±S from the evaluation date. See Williams Fractal for more information about Fractals and window_span.

Historical quotes requirements

You must have at least 2×S+1 periods of quotes to cover the warmup periods; however, more is typically provided since this is a chartable candlestick pattern.

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.

Return

FCBResults[FCBResult]

FCBResult

name type notes
date datetime Date
upper_band Decimal, Optional FCB upper band
lower_band Decimal, Optional FCB lower band

Utilities

See Utilities and Helpers for more information.

Example

from stock_indicators import indicators

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

# Calculate Fcb(14)
results = indicators.get_fcb(quotes, 14)

About Fractal Chaos Bands (FCB)

Created by Edward William Dreiss, Fractal Chaos Bands outline high and low price channels to depict broad less-chaotic price movements. FCB is a channelized depiction of Williams Fractal. [Discuss] 💬

image

Sources