TA-Lib serves two roles: an acceleration backend and a parity oracle. It is fully optional.
1. Acceleration Backend
By default, core indicators (e.g., ema, sma, rsi) use native Python implementations. If TA-Lib is installed, you can opt-in to use its C-based implementation for potentially better performance by passing talib=True to the indicator method.
2. Candlestick Patterns (CDL family)
TA-Lib is never used for CDL patterns. All 62 CDL patterns use native Python implementations. The talib=True argument has no effect on these calls.
Installation
For versions 0.6.5+, binary wheels are available for Linux, macOS, and Windows (x86_64, arm64). It is recommended to install ta-lib>=0.6.8 to ensure out-of-the-box compatibility.
uv pip install "ta-lib>=0.6.8"
# or
pip install "ta-lib>=0.6.8"
import pandas_ta_classic as ta
# Uses native EMA — default behaviour
ema = df.ta.ema(length=20)
# Use TA-Lib implementation if installed
ema = df.ta.ema(length=20, talib=True)
# CDL patterns — always native, talib= kwarg has no effect here
df = df.ta.cdl_pattern(name="engulfing") # native
result = df.ta.cdl_pattern(name="hammer") # native