get_parabolic_sar(quotes, acceleration_step=0.02, max_acceleration_factor=0.2)
More overloaded interfaces
get_parabolic_sar(quotes, acceleration_step, max_acceleration_factor, initial_factor)
||Iterable[Quote]||Iterable(such as list or an object having
• Need help with pandas.DataFrame?
||float, default 0.02||Incremental step size for the Acceleration Factor. Must be greater than 0.|
||float, default 0.2||Maximum factor limit. Must be greater than
||float||Initial Acceleration Factor. Must be greater than 0. Default is
Historical quotes requirements
You must have at least two historical quotes to cover the warmup periods; however, we recommend at least 100 data points. Initial Parabolic SAR values prior to the first reversal are not accurate and are excluded from the results. Therefore, provide sufficient quotes to capture prior trend reversals, before your intended usage period.
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
ParabolicSARResultsis 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.
- The first trend will have
Nonevalues since it is not accurate and based on an initial guess.
||float, Optional||Stop and Reverse value|
||bool, Optional||Indicates a trend reversal|
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 ParabolicSar(0.02,0.2) results = indicators.get_parabolic_sar(quotes, 0.02, 0.2)
About Parabolic SAR
Created by J. Welles Wilder, Parabolic SAR (stop and reverse) is a price-time based indicator used to determine trend direction and reversals. [Discuss]