Gator Oscillator

get_gator(quotes: Iterable[Quote])

get_gator(quotes: Iterable[AlligatorResult])

Parameters

name type notes
quotes Iterable[Quote] or Iterable[AlligatorResult] Iterable of the Quote or Alligator Result.
See here for usage with pandas.DataFrame

Historical quotes requirements

If using default settings, you must have at least 121 periods of quotes. Since this uses a smoothing technique, we recommend you use at least 271 data points prior to the intended usage date for better precision. If using a custom Alligator configuration, see Alligator documentation for historical quotes requirements.

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

Return

GatorResults[GatorResult]

Convergence warning: The first 150 periods will have decreasing magnitude, convergence-related precision errors that can be as high as ~5% deviation in indicator values for earlier periods.

GatorResult

name type notes
date datetime Date
upper float, Optional Absolute value of Alligator Jaw-Teeth
lower float, Optional Absolute value of Alligator Lips-Teeth
is_upper_expanding bool, Optional Upper value is growing
is_lower_expanding bool, Optional Lower value is growing

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 the Gator Oscillator
results = indicators.get_gator(quotes)

About Gator Oscillator

Created by Bill Williams, the Gator Oscillator is an expanded view of Williams Alligator. [Discuss] 💬

image

Sources