393 technical indicators. One library. Brutal architectural trade-offs for absolute speed.
QuanTAlib grinds through half a million bars of SMA in 328 microseconds. Faster than an L1 cache miss. The same indicators run in C#, Python, and PineScript. Cross-validated against TA-Lib, Tulip, Skender, and every other implementation worth testing.
We achieve this by trading object allocation for contiguous memory spans and forcing SIMD vectorization. You want speed? We dictate the heap.
Pick your weapon:
| Platform | Install | Guide |
|---|---|---|
| C# / .NET 10 | dotnet add package QuanTAlib |
Architecture . API Reference |
| Python | pip install quantalib |
Python Guide |
| PineScript v6 | Copy-paste from lib/ |
PineScript Guide |
using QuanTAlib;
// No allocations in the update loop. State is maintained internally.
var sma = new Sma(period: 14);
var result = sma.Update(110.4);
if (result.IsHot)
Console.WriteLine($"SMA: {result.Value}");// We evaluate code, not promises.
// This processes as contiguous memory using AVX-512 vectorization.
// Zero allocations. The Garbage Collector sleeps.
double[] prices = LoadHistoricalData();
double[] results = new double[prices.Length];
Sma.Batch(prices.AsSpan(), results.AsSpan(), period: 14);import quantalib as qtl
import numpy as np
prices = np.random.default_rng(42).normal(100, 2, size=500_000)
sma = qtl.sma(prices, period=14) # 393 indicators, similar syntaxWorks with NumPy, pandas, polars, and PyArrow. Full Python guide →
Every indicator ships as a standalone .pine file. Open it. Copy it. Paste it into TradingView. No magic, just math. Full PineScript guide →
| Category | Count | What It Measures | Examples |
|---|---|---|---|
| Core | 8 | Price transforms, building blocks | AVGPRICE, MEDPRICE, TYPPRICE, HA |
| Trends (FIR) | 33 | Finite impulse response averages | SMA, WMA, HMA, ALMA, TRIMA, LSMA |
| Trends (IIR) | 36 | Infinite impulse response averages | EMA, DEMA, TEMA, T3, JMA, KAMA, VIDYA |
| Filters | 37 | Signal processing, noise reduction | Kalman, Butterworth, Gaussian, Savitzky-Golay |
| Oscillators | 48 | Bounded/centered oscillators | RSI, MACD, Stochastic, CCI, Fisher, Williams %R |
| Dynamics | 21 | Trend strength and direction | ADX, Aroon, SuperTrend, Ichimoku, Vortex |
| Momentum | 19 | Speed of price changes | ROC, Momentum, Velocity, TSI, Qstick |
| Volatility | 26 | Price variability | ATR, Bollinger Width, Historical Vol, True Range |
| Volume | 27 | Trading activity | OBV, VWAP, MFI, CMF, ADL, Force Index |
| Statistics | 35 | Statistical measures | Correlation, Variance, Skewness, Z-Score |
| Channels | 23 | Price boundaries | Bollinger Bands, Keltner, Donchian |
| Cycles | 14 | Cycle analysis | Hilbert Transform, Homodyne, Ehlers Sine Wave |
| Reversals | 12 | Pattern detection | Pivot Points, Fractals, Swings |
| Forecasts | 1 | Predictive indicators | Time Series Forecast |
| Errors | 26 | Error metrics, loss functions | RMSE, MAE, MAPE, SMAPE, R² |
| Numerics | 27 | Mathematical transforms | Log, Exp, Sigmoid, Normalize, FFT |
500,000 bars. Period 220. .NET 10.0, AVX-512. Zero allocations.
| Library | SMA Time | Allocations | vs QuanTAlib |
|---|---|---|---|
| QuanTAlib | 328 μs | 0 B | — |
| TA-Lib | 365 μs | 32 B | 1.1× slower |
| Tulip | 370 μs | 0 B | 1.1× slower |
| Skender | 68,436 μs | 42 MB | 209× slower |
| Ooples | 347,453 μs | 151 MB | 1,060× slower |
That is 0.66 nanoseconds per value — faster than a single L1 cache miss. Full benchmarks →
- Architecture — SoA memory layout, SIMD vectorization, O(1) streaming, design philosophy
- API Reference — Batch, Streaming, and Priming modes
- Usage Patterns — Span, Streaming, Batch, Eventing examples
- Integration — Quantower, NinjaTrader, QuantConnect
- Benchmarks — SMA, EMA, RSI, MACD, Bollinger, Chaikin results
- Validation — Cross-library verification matrices
- Error Metrics — 26 error and loss functions
- Trend Comparison — Lag, smoothness, accuracy across MAs
- MA Qualities — Theoretical framework for MA evaluation
- Glossary — Core concepts and terminology
Static analysis: NDepend · Codacy · SonarCloud · CodeFactor
This library is not yet 1.0.0. There is exactly one grumpy engineer behind it, fueled by mass amounts of caffeine and an irrational belief that all technical indicators should be correct down to the 10th decimal place.
Implemented indicators are not yet complete. Things will break. APIs will change. Some indicators might produce values that make your quantitative models question the meaning of life. If you find something broken and don't open an issue, the grumpy dev will have absolutely no idea what needs fixing — and the backlog of things to fix, improve, and add is already longer than a Bollinger Band on a meme stock.
Your bug reports make this library better. Your silence makes the dev mass more coffee.
Licensed under Apache 2.0. Not MIT. Not BSD. Deliberately.