Python wrapper for TA-Lib (http://ta-lib.org/).
Repo TA-Lib/ta-lib-python, read from GitHub 4 h ago. TA-Lib has not joined Take My Repo.
[NEW]: Update to TA-Lib C 0.8.3.
[NEW]: This includes new TA functions: ALMA, ASI, BBW, CG, CHOP, CHOPTR, CKSP, CRSI, CTI, DOSC, EMV, FISHER, FRAMA, IBS, ICHIMOKU, KST, KSTEXT, KURTOSIS, KVO, MCGD, MEDIAN, PERCENTB, PSO, ROGERSSATCHELL, RVIR, SI, SQZMOM, STC, SWAK_2PHP, SWAK_BP, SWAK_BUTTER, SWAK_GAUSS, SWAK_HP, VIDYA, WAVETREND, ZIGZAG
[NEW]: Additional moving average types MA_Type.VIDYA and MA_Type.ALMA.
[NEW]: Source builds download and verify TA-Lib C 0.8.3, build it as a static library and link it into the extension. A compiler, CMake and network access are required; a separate TA-Lib C installation is no longer needed. Generated C files remain included in source distributions.
[CHANGE]: Setting TA_INCLUDE_PATH or TA_LIBRARY_PATH uses an existing TA-Lib C installation instead, without downloading or building the C library. If only one is set, the other uses the standard search paths.
[CHANGE]: Wheels statically link TA-Lib C through the same build process.
[NEW]: Support free-threaded CPython without enabling the GIL on import.
[NEW]: Include Python 3.15 wheels.
[CHANGE]: talib.stream is now the real streaming API of TA-Lib C 0.8.1: stream.SMA(close) returns a handle, not a value. handle.value is the value at the last history bar, handle.update(bar) costs O(1) and returns that bar's value, handle.peek(bar) evaluates a forming bar without committing it, and handle.copy() forks it. stream.SMA.open_and_fill() returns the handle and the Function API's series in one pass. A multi-output function answers with the same tuple the Function API returns. The old last-value functions -- talib.stream.SMA, talib.stream_SMA, and their _ta_lib.pyi stubs -- are gone; talib/stream.pyi types the handles instead.
Migrating is stream.X(...) -> stream.X(...).value, and the compiler cannot find the sites for you: if stream.CDLDOJI(o, h, l, c): used to test the pattern and now tests a handle, which is always true.
[NEW]: talib.InsufficientHistory, raised when a stream is opened with too little history. It is the library's one recoverable error, so it is catchable on its own rather than as a bare Exception.
[FIX]: help(talib.SUPERTREND) and the abstract stub named the outputs real and integer; they are supertrend and trend, the names abstract.Function('SUPERTREND').output_names already reported.
[FIX]: An empty array given to a function whose lookback is zero, such as talib.ACOS or talib.MA(x, timeperiod=1), made TA-Lib read and write one element outside the buffers, which could crash the interpreter later or corrupt memory silently. An empty input now returns empty outputs without calling TA-Lib, whatever the function and its parameters. The bug dates from 0.4.27.
[NEW]: Support TA-Lib C 0.8.1, which is now the minimum required version.
[NEW]: The 40 functions TA-Lib C added since 0.7.1: AC, ADR, AO, CMF, CMOU, COPPOCK, CUMSUM, CVI, DONCHIAN, DPO, EFI, ER, ERI, FOSC, FRACTAL, HA, HMA, KC, KDJ, MARKETFI, MASSI, NVI, PERCENTILE, PERCENTRANK, PVI, PVO, PVT, QSTICK, RMA, RVI, RVOL, SMI, SUPERTREND, TSI, VHF, VORTEX, VWAP, VWMA, WAD, ZLEMA.
[NEW]: New moving averages: MA_Type.HMA, MA_Type.DISABLED, MA_Type.DEFAULT, MA_Type.ZLEMA and MA_Type.RMA.
[NEW]: set_unstable_period() and get_unstable_period() accept 'RMA', 'HA' and 'RVI'.
[FIX]: abstract raised KeyError on function and output flags added after this wrapper was written; unknown flag bits are now ignored.
[FIX]: A moving-average parameter not spelled exactly matype -- KDJ's slowk_matype -- defaulted to SMA rather than to the function's own documented default.
[FIX]: An integer output is documented as the candlestick -100/0/100 convention only for candlestick functions; SUPERTREND's is a trend direction.
[CHANGE]: APO and PPO now default matype to EMA, and BBANDS defaults timeperiod to 20, following TA-Lib C 0.8.1.
[FIX]: set_unstable_period() targeted the wrong function for every id after IMI (e.g. 'RSI' set PLUS_DM); ids now come from the C header. 'ADXR', 'MFI' and 'STOCHRSI' are no-ops that emit a DeprecationWarning.
[CHANGE]: Remove the unnecessary build runtime dependency and wheel build dependency.
[NEW]: Upgrade to Cython 3.3.0
[NEW]: Upgrade to latest TA-Lib upstream C library v0.7.1 release
[NEW]: Upgrade to Cython 3.2.8
[FIX]: Adding ACCBANDS, AVGDEV, IMI to get_func_groups()
[FIX]: Adding ACCBANDS, AVGDEV, IMI to docs pages
[NEW]: Adding an abstract.pyi for typing