Skip to content

Wickra vs TA-Lib

TA-Lib has been the reference technical-analysis library for two decades, and most indicator code in the wild calls it. Wickra keeps TA-Lib's conventions where they matter — the same seeding, the same smoothing, the same warmup positions — and changes the model underneath: an indicator is a state machine that advances one price at a time, so a backtest and a live feed run the same code. This page compares the two on what decides a switch. To port code, the TA-Lib migration guide maps every function.

At a glance ​

TA-LibWickra
Modelfunction over an array: talib.RSI(close, 14)object with state: RSI(14), then .update(price) or .batch(close)
Live datarecomputes the whole history on every new tickone update per tick, constant time, no pass over the history
Batch vs streamingno streaming path to compare againstbatch is bit for bit what update produces, pinned by tests
Install (Python)the TA-Lib C library first, then the wrapperpip install wickra: prebuilt wheels, no C toolchain, no NumPy needed
LanguagesC, with community wrappersRust, Python, Node.js, WebAssembly, C, C++, C#, Go, Java, R — one core
Same values in every languageeach wrapper calls the same Cevery indicator replayed through all ten languages against the Rust core's golden fixtures in CI
Cataloguethe classic indicators and candlestick patternsthe classics plus market breadth, microstructure, derivatives, cycle filters, risk metrics — see the indicator catalogue
LicenseBSDMIT or Apache-2.0

The same conventions ​

Wickra follows TA-Lib wherever TA-Lib defines the textbook behaviour, so a ported strategy produces the numbers it produced before:

  • EMA seeds from the simple average of the first period inputs and then smooths with α = 2 / (period + 1) — the TA-Lib convention.
  • RSI and ATR use Wilder's smoothing.
  • The warmup positions of a batch are NaN, as in TA-Lib's output arrays, and every indicator states its exact warmup on its page and in Warmup periods.
  • The Python names follow TA-Lib's where TA-Lib has one (wickra.SMA, wickra.RSI, wickra.MACD); multi-output indicators such as BollingerBands return one column per output.

The reference-value tests of the Python binding check Wickra's output against TA-Lib's for the indicators both libraries ship.

The difference: streaming ​

A live trading system sees one new price at a time. TA-Lib has no way to advance an indicator by one value: talib.RSI(close, 14) walks the entire close array again, so the work per tick grows with the history kept. Wickra holds the indicator's state in the object and advances it once:

python
import wickra

rsi = wickra.RSI(14)
for price in live_feed:            # one price per tick
    value = rsi.update(price)      # None during warmup, then a float

With a 5 000-bar history, re-running TA-Lib's RSI on every tick costs about 298 µs; Wickra's update costs about 0.061 µs through the Python binding — the gap grows linearly with the history. The full measurements, against TA-Lib, tulipy, pandas-ta, finta and the incremental talipp, are on the benchmark page.

The same object serves the backtest: RSI(14).batch(close) returns the full series, and it is bit for bit what feeding close through update returns. A strategy tested on history therefore makes the same decisions live.

Batch speed ​

For a whole array in one call, the two libraries are close; Wickra adds an opt-in batch_fast that runs SIMD kernels and agrees with batch to within a few units in the last place. Python, 20 000 bars, µs per call (lower is faster), measured in one Python 3.12 run:

IndicatorTA-LibWickra batchWickra batch_fast
SMA(20)15.520.59.0
EMA(20)30.332.09.7
RSI(14)74.738.322.9
MACD(12, 26, 9)102.140.127.9
Bollinger(20, 2.0)71.575.033.1
ATR(14)84.441.128.1

The exact batch is faster on RSI, MACD and ATR and within a few microseconds on the rest; the fast batch leads every row. The numbers, the machine and the commands to reproduce them are on the benchmark page.

Porting a script ​

The change is mechanical: construct the indicator once, then call batch where the script called the TA-Lib function.

python
import talib
macd, signal, hist = talib.MACD(close, 12, 26, 9)
python
import wickra
out = wickra.MACD(12, 26, 9).batch(close)   # Matrix, shape (n, 3): macd, signal, histogram
macd, signal, hist = (list(col) for col in zip(*out.tolist()))

The migration guide has the full function table and the argument-order differences (for example STOCH and STOCHRSI, whose period arguments are grouped differently).

When TA-Lib is enough ​

If your code computes indicators once over a finished array, TA-Lib is already installed, and you never run the same logic on live data, the batch numbers above say the speed difference is small. Wickra matters when the same indicator has to run on a live feed, when the code has to run outside Python, when an install without a C library matters, or when the indicator you need is not in TA-Lib's catalogue.

See also ​