diff --git a/README.md b/README.md index 3b3e61f..88a87b8 100644 --- a/README.md +++ b/README.md @@ -920,7 +920,7 @@ Back to [Contents](#contents) * _Jurik Moving Average_: **jma** * _Kaufman's Adaptive Moving Average_: **kama** * _Linear Regression_: **linreg** -* _Ehler's MESA Adapative Moving Average_: **mama** +* _Ehler's MESA Adaptive Moving Average_: **mama** * Includes: **fama** * _McGinley Dynamic_: **mcgd** * _Midpoint_: **midpoint** diff --git a/examples/PandasTA_Study_Examples.ipynb b/examples/PandasTA_Study_Examples.ipynb index 5e2b76c..2cc580a 100644 --- a/examples/PandasTA_Study_Examples.ipynb +++ b/examples/PandasTA_Study_Examples.ipynb @@ -466,7 +466,7 @@ "[+] Saving: /Users/kj/av_data/SPY_D.csv\n", "[+] Study: Common Price and Volume SMAs\n", "[i] Indicator arguments: {'timed': True, 'append': True}\n", - "[i] No mulitproccessing (cores = 0).\n" + "[i] No multiprocessing (cores = 0).\n" ] }, { @@ -502,7 +502,7 @@ "[+] Saving: /Users/kj/av_data/IWM_D.csv\n", "[+] Study: Common Price and Volume SMAs\n", "[i] Indicator arguments: {'timed': True, 'append': True}\n", - "[i] No mulitproccessing (cores = 0).\n" + "[i] No multiprocessing (cores = 0).\n" ] }, { diff --git a/examples/example.ipynb b/examples/example.ipynb index c8b93e0..8633876 100644 --- a/examples/example.ipynb +++ b/examples/example.ipynb @@ -836,7 +836,7 @@ "[i] Loaded SPY(7367, 34)\n", "[+] Study: Common Price and Volume SMAs\n", "[i] Indicator arguments: {'append': True}\n", - "[i] No mulitproccessing (cores = 0).\n" + "[i] No multiprocessing (cores = 0).\n" ] }, { diff --git a/pandas_ta/core.py b/pandas_ta/core.py index b4330ea..49068aa 100644 --- a/pandas_ta/core.py +++ b/pandas_ta/core.py @@ -222,7 +222,7 @@ class AnalysisIndicators(object): @property def time_range(self) -> Float: - """Returns the time ranges of the DataFrame as a float. Default is in "years". help(ta.toal_time)""" + """Returns the time ranges of the DataFrame as a float. Default is in "years". help(ta.total_time)""" return total_time(self._df, self._time_range) @time_range.setter @@ -717,9 +717,9 @@ class AnalysisIndicators(object): else: # Without multiprocessing: if verbose: - _col_msg = f"[i] No mulitproccessing (cores = 0)." + _col_msg = f"[i] No multiprocessing (cores = 0)." if has_col_names: - _col_msg = f"[i] No mulitproccessing support for 'col_names' option." + _col_msg = f"[i] No multiprocessing support for 'col_names' option." print(_col_msg) if mode["custom"]: diff --git a/pandas_ta/custom.py b/pandas_ta/custom.py index d8fbb40..939aa58 100644 --- a/pandas_ta/custom.py +++ b/pandas_ta/custom.py @@ -147,7 +147,7 @@ def import_dir(path: str, verbose: bool = True): >>> import_dir(ta_dir) - If your custom indicator(s) loaded succesfully then it should behave exactly + If your custom indicator(s) loaded successfully then it should behave exactly like all other native indicators in pandas_ta, including help functions. """ # ensure that the passed directory exists / is readable diff --git a/pandas_ta/momentum/inertia.py b/pandas_ta/momentum/inertia.py index b56f1dd..d951d01 100644 --- a/pandas_ta/momentum/inertia.py +++ b/pandas_ta/momentum/inertia.py @@ -25,7 +25,7 @@ def inertia( Inertia was developed by Donald Dorsey and was introduced his article in September, 1995. It is the Relative Vigor Index smoothed by the Least - Squares Moving Average. Postive Inertia when values are greater than 50, + Squares Moving Average. Positive Inertia when values are greater than 50, Negative Inertia otherwise. Sources: diff --git a/pandas_ta/momentum/rsi.py b/pandas_ta/momentum/rsi.py index 1847523..a0e63e9 100644 --- a/pandas_ta/momentum/rsi.py +++ b/pandas_ta/momentum/rsi.py @@ -64,8 +64,8 @@ def rsi( negative = close.diff(drift) positive = negative.copy() - positive[positive < 0] = 0 # Make negatives 0 for the postive series - negative[negative > 0] = 0 # Make postives 0 for the negative series + positive[positive < 0] = 0 # Make negatives 0 for the positive series + negative[negative > 0] = 0 # Make positives 0 for the negative series positive_avg = rma(positive, length=length) negative_avg = rma(negative, length=length) diff --git a/pandas_ta/momentum/stc.py b/pandas_ta/momentum/stc.py index 64b2902..79c01cb 100644 --- a/pandas_ta/momentum/stc.py +++ b/pandas_ta/momentum/stc.py @@ -19,12 +19,12 @@ def stc( """Schaff Trend Cycle (STC) The Schaff Trend Cycle is an evolution of the popular MACD - incorportating two cascaded stochastic calculations with additional + incorporating two cascaded stochastic calculations with additional smoothing. The STC returns also the beginning MACD result as well as the result after the first stochastic including its smoothing. This implementation - has been extended for Pandas TA to also allow for separatly feeding any + has been extended for Pandas TA to also allow for separately feeding any other two moving Averages (as ma1 and ma2) or to skip this to feed an oscillator, based on which the Schaff Trend Cycle should be calculated. @@ -55,9 +55,9 @@ def stc( offset (int): How many periods to offset the result. Default: 0 Kwargs: - ma1: External MA (mandatory in conjuction with ma2) - ma2: External MA (mandatory in conjuction with ma1) - osc: External osillator + ma1: External MA (mandatory in conjunction with ma2) + ma2: External MA (mandatory in conjunction with ma1) + osc: External oscillator fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method @@ -94,14 +94,14 @@ def stc( if ma1 is None or ma2 is None: return - # According to external feeded series + # According to external feed series xmacd = ma1 - ma2 pff, pf = schaff_tc(close, xmacd, tclength, factor) elif isinstance(osc, Series): osc = v_series(osc, _length) if osc is None: return - # According to feeded oscillator (should be ranging around 0 x-axis) + # According to feed oscillator (should be ranging around 0 x-axis) xmacd = osc pff, pf = schaff_tc(close, xmacd, tclength, factor) else: diff --git a/pandas_ta/overlap/alligator.py b/pandas_ta/overlap/alligator.py index 785f254..91fefe6 100644 --- a/pandas_ta/overlap/alligator.py +++ b/pandas_ta/overlap/alligator.py @@ -14,7 +14,7 @@ def alligator( The Alligator Indicator was developed by Bill Williams and combines moving averages with fractal geometry and the lines are meant to - resemeble an alligator opening and closing his mouth.. It attempts to + resemble an alligator opening and closing his mouth.. It attempts to identify if an asset is trending. It consists of 3 lines: the Alligator's Jaw, Teeth, and Lips. Each have different lookback periods and but require the user to offset the results; this is avoid data leaks diff --git a/pandas_ta/overlap/jma.py b/pandas_ta/overlap/jma.py index 5072bb9..66385ad 100644 --- a/pandas_ta/overlap/jma.py +++ b/pandas_ta/overlap/jma.py @@ -89,10 +89,10 @@ def jma( power = np_power(r_volty, pow1) alpha = np_power(beta, power) - # 1st stage - prelimimary smoothing by adaptive EMA + # 1st stage - preliminary smoothing by adaptive EMA ma1 = (1 - alpha) * price + alpha * ma1 - # 2nd stage - one more prelimimary smoothing by Kalman filter + # 2nd stage - one more preliminary smoothing by Kalman filter det0 = (1 - beta) * (price - ma1) + beta * det0 ma2 = ma1 + pr * det0 diff --git a/pandas_ta/overlap/mama.py b/pandas_ta/overlap/mama.py index e6ab69f..53a250c 100644 --- a/pandas_ta/overlap/mama.py +++ b/pandas_ta/overlap/mama.py @@ -103,9 +103,9 @@ def mama( prenan: Int = None, talib: bool = None, offset: Int = None, **kwargs: DictLike ) -> Series: - """Ehler's MESA Adapative Moving Average (MAMA) + """Ehler's MESA Adaptive Moving Average (MAMA) - Ehler's MESA Adapative Moving Average (MAMA) aka the Mother of All Moving + Ehler's MESA Adaptive Moving Average (MAMA) aka the Mother of All Moving Averages attempts to adapt to the source's dynamic nature. The adapation is based on the rate change of phase as measured by the Hilbert Transform Discriminator. The advantage of this method of adaptation is diff --git a/pandas_ta/overlap/ssf.py b/pandas_ta/overlap/ssf.py index 0cbb24e..efb7bd7 100644 --- a/pandas_ta/overlap/ssf.py +++ b/pandas_ta/overlap/ssf.py @@ -53,7 +53,7 @@ def ssf( John F. Ehlers's solution to reduce lag and remove aliasing noise with his research in Aerospace analog filter design. This implementation had - two poles. Since SSF is a (Resursive) Digital Filter, the number of + two poles. Since SSF is a (Recursive) Digital Filter, the number of poles determine how many prior recursive SSF bars to include in the filter design. diff --git a/pandas_ta/overlap/ssf3.py b/pandas_ta/overlap/ssf3.py index c88d580..9cea91e 100644 --- a/pandas_ta/overlap/ssf3.py +++ b/pandas_ta/overlap/ssf3.py @@ -40,7 +40,7 @@ def ssf3( John F. Ehlers's solution to reduce lag and remove aliasing noise with his research in aerospace analog filter design. This is - implementation has three poles. Since SSF is a (Resursive) Digital + implementation has three poles. Since SSF is a (Recursive) Digital Filter, the number of poles determine how many prior recursive SSF bars to include in the filter design. diff --git a/pandas_ta/utils/_core.py b/pandas_ta/utils/_core.py index b7453f6..157af9b 100644 --- a/pandas_ta/utils/_core.py +++ b/pandas_ta/utils/_core.py @@ -111,7 +111,7 @@ def unsigned_differences(series: Series, amount: Int = None, Default Example: series = Series([3, 2, 2, 1, 1, 5, 6, 6, 7, 5, 3]) and returns - postive = Series([0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0]) + positive = Series([0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0]) negative = Series([0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1]) """ amount = int(amount) if amount is not None else 1 diff --git a/pandas_ta/utils/_time.py b/pandas_ta/utils/_time.py index d4d43b7..55f61c6 100644 --- a/pandas_ta/utils/_time.py +++ b/pandas_ta/utils/_time.py @@ -46,7 +46,7 @@ def df_year_to_date(df: DataFrame) -> DataFrame: def final_time(stime: Float) -> str: - """Human readable elapsed time. Calculates the final time elasped since + """Human readable elapsed time. Calculates the final time elapsed since stime and returns a string with microseconds and seconds.""" time_diff = perf_counter() - stime return f"{time_diff * 1000:2.4f} ms ({time_diff:2.4f} s)" diff --git a/pandas_ta/utils/data/yahoofinance.py b/pandas_ta/utils/data/yahoofinance.py index e42bc3c..50abf80 100644 --- a/pandas_ta/utils/data/yahoofinance.py +++ b/pandas_ta/utils/data/yahoofinance.py @@ -436,7 +436,7 @@ def yf(ticker: str, **kwargs) -> DataFrame: print( f"[!] Best choice: update yfinance to the latest version.") print( - f"[!] Ignore if aleady patched. Some tickers do not have financials.") + f"[!] Ignore if already patched. Some tickers do not have financials.") print( f"[!] Otherwise to enable Company Financials, see yfinance Issue #517 patch.") print( diff --git a/pandas_ta/volatility/atr.py b/pandas_ta/volatility/atr.py index 65baaf1..9c178e8 100644 --- a/pandas_ta/volatility/atr.py +++ b/pandas_ta/volatility/atr.py @@ -24,7 +24,7 @@ def atr( ) -> Series: """Average True Range (ATR) - Averge True Range is used to measure volatility, especially volatility + Average True Range is used to measure volatility, especially volatility caused by gaps or limit moves. Sources: diff --git a/pandas_ta/volatility/massi.py b/pandas_ta/volatility/massi.py index 3a8c2f9..9c95f39 100644 --- a/pandas_ta/volatility/massi.py +++ b/pandas_ta/volatility/massi.py @@ -13,7 +13,7 @@ def massi( """Mass Index (MASSI) The Mass Index is a non-directional volatility indicator that - utilitizes the High-Low Range to identify trend reversals based on + utilizes the High-Low Range to identify trend reversals based on range expansions. Sources: diff --git a/pandas_ta/volume/vwap.py b/pandas_ta/volume/vwap.py index a71e142..48ed2ca 100644 --- a/pandas_ta/volume/vwap.py +++ b/pandas_ta/volume/vwap.py @@ -33,7 +33,7 @@ def vwap( https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases Default: "D". bands (list): List of deviations to be calculated. Calculates upper - and lower values given a postive list of ints or floats. + and lower values given a positive list of ints or floats. Default: [] offset (int): How many periods to offset the result. Default: 0 diff --git a/tests/test_ext_indicator_cycles.py b/tests/test_ext_indicator_cycles.py index 8997b5f..17ced4e 100644 --- a/tests/test_ext_indicator_cycles.py +++ b/tests/test_ext_indicator_cycles.py @@ -5,7 +5,7 @@ from pandas import DataFrame from .config import sample_data -class TestCylesExtension(TestCase): +class TestCyclesExtension(TestCase): @classmethod def setUpClass(cls): cls.data = sample_data diff --git a/tests/test_indicator_candle.py b/tests/test_indicator_candle.py index 8883b82..cc2e9c3 100644 --- a/tests/test_indicator_candle.py +++ b/tests/test_indicator_candle.py @@ -79,7 +79,7 @@ class TestCandle(TestCase): self.assertEqual(result.name, "CDL_Z_30_1") def test_ha(self): - """Candle: Heiken Ashi""" + """Candle: Heikin Ashi""" result = pandas_ta.ha(self.open, self.high, self.low, self.close) self.assertIsInstance(result, DataFrame) self.assertEqual(result.name, "Heikin-Ashi")