{"id":8704,"library":"technical","title":"Technical Indicators for Financial Analysis","description":"Technical is a Python library that provides a comprehensive collection of technical indicators and utility functions for financial time series analysis. It is designed to be easy to use and is a companion project primarily developed for Freqtrade, assisting in quantitative trading strategy development. The library is actively maintained with frequent releases, currently at version 1.6.0.","status":"active","version":"1.6.0","language":"en","source_language":"en","source_url":"https://github.com/freqtrade/technical","tags":["financial-analysis","technical-indicators","trading","pandas","numpy","freqtrade","quant-trading"],"install":[{"cmd":"pip install technical","lang":"bash","label":"Install stable version from PyPI"}],"dependencies":[{"reason":"Core data structure (DataFrame/Series) for input and output, used heavily throughout the library.","package":"pandas"},{"reason":"Underlying numerical operations for performance and integration with pandas.","package":"numpy"},{"reason":"Provides optimized C implementations for many technical indicators, wrapped by `technical` for enhanced performance. Installation of the underlying C library is often required for the `ta-lib` python wrapper.","package":"TA-Lib","optional":true}],"imports":[{"note":"Indicators are typically imported directly from the `technical.indicators` submodule.","wrong":"import technical.accumulation_distribution","symbol":"accumulation_distribution","correct":"from technical.indicators import accumulation_distribution"},{"note":"Utility functions like resampling are available in the `technical.util` submodule.","symbol":"resample_to_interval","correct":"from technical.util import resample_to_interval"}],"quickstart":{"code":"import pandas as pd\nfrom technical.indicators import sma\n\n# Create a sample DataFrame with 'close' prices\ndf = pd.DataFrame({\n    'close': [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n})\n\n# Calculate Simple Moving Average (SMA) with a period of 3\ndf['sma_3'] = sma(df['close'], period=3)\n\nprint(df)","lang":"python","description":"This quickstart demonstrates how to create a pandas DataFrame and then use the `sma` indicator from the `technical.indicators` module to calculate a Simple Moving Average. Indicators typically take a pandas Series (e.g., 'close' prices) and return a new Series."},"warnings":[{"fix":"Upgrade Python to version 3.11 or later. E.g., `pyenv install 3.11.8 && pyenv local 3.11.8`","message":"Python 3.10 support was dropped in version 1.5.4. Ensure your environment uses Python 3.11 or newer for compatibility.","severity":"breaking","affected_versions":">=1.5.4"},{"fix":"Replace calls to `zema()` with `dema()` to avoid warnings and use the correct terminology. Example: `df['dema'] = dema(df['close'], period=X)`","message":"The `zema` indicator is deprecated and will issue a `FutureWarning`. Its implementation was found to be functionally equivalent to `dema` (Double Exponential Moving Average).","severity":"deprecated","affected_versions":">=1.4.2"},{"fix":"Upgrade to `technical` version 1.5.4 or newer: `pip install --upgrade technical`","message":"Older versions of `technical` (prior to 1.5.4) might produce pandas `FutureWarning` messages due to API changes in pandas. Version 1.5.4 and later include 'Proper support for latest pandas versions _without deprecation warnings_'.","severity":"gotcha","affected_versions":"<1.5.4"},{"fix":"Ensure your code explicitly handles or is compatible with pandas Series return types for `tv_hma()` and `tv_wma()`.","message":"The `tv_hma()` and `tv_wma()` functions were updated in version 1.5.0 to consistently return pandas Series objects, rather than potentially other types. This might affect code expecting different return types.","severity":"breaking","affected_versions":">=1.5.0"},{"fix":"Refer to the official TA-Lib-Python installation guide or the TA-Lib C library instructions for your specific OS (e.g., `brew install ta-lib` on macOS, manual compilation on Linux, or pre-compiled binaries on Windows).","message":"Installing the underlying TA-Lib C library can be complex, especially on Windows or certain Linux distributions. While `technical` aims to wrap it, errors like 'Cannot find ta-lib library' during installation are common.","severity":"gotcha","affected_versions":"All versions (when TA-Lib is a dependency)"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the library is installed: `pip install technical`. If using a virtual environment, activate it first. If running from a custom script location, ensure the package is on `PYTHONPATH` or added to `sys.path`.","cause":"The 'technical' package is not installed in the current Python environment or is not accessible via `sys.path`.","error":"ModuleNotFoundError: No module named 'technical'"},{"fix":"Update your code to call `dema` instead of `zema`. For example, `df['dema'] = dema(df['close'], period=X)`.","cause":"You are using the deprecated `zema` function in your code. The developers corrected the underlying indicator's name to `dema` (Double Exponential Moving Average).","error":"/.../technical/indicators/overlap_studies.py:52: FutureWarning: zema is deprecated, use dema instead"},{"fix":"Ensure your input DataFrame columns (e.g., 'close', 'high', 'low', 'volume') are cleaned of `NaN` values before passing them to indicator functions. Common methods include `df.fillna(method='ffill')` or `df.dropna()`. Also, check that the `period` parameter is valid for the length of your data.","cause":"This error often occurs when an indicator function receives input data containing `NaN` (Not a Number) values and attempts to perform arithmetic operations, or if the period for calculation is too short for the input data. Many technical indicators require a certain look-back period.","error":"TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'"},{"fix":"Import the indicator function from `technical.indicators` and pass the Series as an argument. For example, instead of `df['close'].sma(period=X)`, use `from technical.indicators import sma; df['sma'] = sma(df['close'], period=X)`.","cause":"You are trying to call an indicator method directly on a pandas Series, but `technical` indicators are typically functions that take a Series/DataFrame as input. This might also happen if you are confusing `technical` with `pandas_ta` which uses DataFrame extensions.","error":"AttributeError: 'Series' object has no attribute 'some_indicator_name'"}]}