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-Lib | Wickra | |
|---|---|---|
| Model | function over an array: talib.RSI(close, 14) | object with state: RSI(14), then .update(price) or .batch(close) |
| Live data | recomputes the whole history on every new tick | one update per tick, constant time, no pass over the history |
| Batch vs streaming | no streaming path to compare against | batch is bit for bit what update produces, pinned by tests |
| Install (Python) | the TA-Lib C library first, then the wrapper | pip install wickra: prebuilt wheels, no C toolchain, no NumPy needed |
| Languages | C, with community wrappers | Rust, Python, Node.js, WebAssembly, C, C++, C#, Go, Java, R — one core |
| Same values in every language | each wrapper calls the same C | every indicator replayed through all ten languages against the Rust core's golden fixtures in CI |
| Catalogue | the classic indicators and candlestick patterns | the classics plus market breadth, microstructure, derivatives, cycle filters, risk metrics — see the indicator catalogue |
| License | BSD | MIT 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
periodinputs 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 asBollingerBandsreturn 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:
import wickra
rsi = wickra.RSI(14)
for price in live_feed: # one price per tick
value = rsi.update(price) # None during warmup, then a floatWith 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:
| Indicator | TA-Lib | Wickra batch | Wickra batch_fast |
|---|---|---|---|
| SMA(20) | 15.5 | 20.5 | 9.0 |
| EMA(20) | 30.3 | 32.0 | 9.7 |
| RSI(14) | 74.7 | 38.3 | 22.9 |
| MACD(12, 26, 9) | 102.1 | 40.1 | 27.9 |
| Bollinger(20, 2.0) | 71.5 | 75.0 | 33.1 |
| ATR(14) | 84.4 | 41.1 | 28.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.
import talib
macd, signal, hist = talib.MACD(close, 12, 26, 9)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
- TA-Lib migration —
talib.X(...)to Wickra, function by function. - Streaming vs Batch — what the batch/streaming guarantee means.
- Quickstart: Python — install and a first indicator.
- Indicators overview — every indicator by family.
- Benchmarks — the full measurements.