QuanTAlib 0.8.12
dotnet add package QuanTAlib --version 0.8.12
NuGet\Install-Package QuanTAlib -Version 0.8.12
<PackageReference Include="QuanTAlib" Version="0.8.12" />
<PackageVersion Include="QuanTAlib" Version="0.8.12" />
<PackageReference Include="QuanTAlib" />
paket add QuanTAlib --version 0.8.12
#r "nuget: QuanTAlib, 0.8.12"
#:package QuanTAlib@0.8.12
#addin nuget:?package=QuanTAlib&version=0.8.12
#tool nuget:?package=QuanTAlib&version=0.8.12
QuanTAlib
447 technical indicators. One library. Brutal architectural trade-offs for absolute speed.
QuanTAlib exists because I got tired of validating other people's indicators. Every implementation is cross-checked against TA-Lib, Tulip, Skender, and Pandas-TA. Where they disagree, we went to the original papers. Where the papers disagree, we picked the math that doesn't lie.
Same indicators, same results: C#, Python, and PineScript.
How Fast?
C# native AOT-compiled code spits out half a million bars of SMA in 288 microseconds. That is faster (per value) than a single L1 cache miss on any fancy new CPU. Achieved by trading object allocation for contiguous memory spans, slapping Fused Multiply-Add (FMA) on everything, and forcing SIMD vectorized paths. You want speed? We dictate the heap.
| Library | SMA (500K bars) | Allocations | Relative time |
|---|---|---|---|
| QuanTAlib | 288 μs | 0 B | 1× |
| TA-Lib (C++) | 365 μs | 32 B | 1.3× slower |
| Wickra (Rust) | 1,562 μs | 4 MB | 5.4× slower |
| Skender (C#) | 68,378 μs | 42 MB | 238× slower |
| Ooples (C#) | 346,187 μs | 151 MB | 1,202× slower |
Measured with BenchmarkDotNet v0.15.3 on .NET 10 x64 (AVX-512), 500K bars, period 220. Benchmark project →
Skender and Ooples are measured on their list-based APIs; QuanTAlib on its zero-allocation span API. Same input, same output — different memory shape.
Install
| Platform | Install | Guide |
|---|---|---|
| .NET | dotnet add package QuanTAlib |
Architecture . API Reference |
| Python | pip install quantalib |
Python Guide |
| PineScript v6 | Copy-paste to TradingView | PineScript Guide |
pip install quantalib ships a compiled native wheel — no source build, no C++ toolchain:
| Platform | Wheel tag |
|---|---|
| Windows x64 | win_amd64 |
| Linux x64 | manylinux_2_17_x86_64 |
| Linux arm64 (AWS Graviton) | manylinux_2_17_aarch64 |
| macOS arm64 (Apple Silicon) | macosx_11_0_arm64 |
| macOS x64 (Intel) | macosx_10_13_x86_64 |
Show Me the Code
C# Streaming (Real-time incoming data, value by value)
using QuanTAlib;
var sma = new Sma(period: 14);
var result = sma.Update(110.4);
if (result.IsHot)
Console.WriteLine($"SMA: {result.Value}");
State lives inside the indicator. No list of historic bars. No LINQ chains allocating their way to thermal throttling. Call .Update(), get answer.
C# — batch (500K bars in microseconds)
double[] prices = LoadHistoricalData();
double[] results = new double[prices.Length];
Sma.Batch(prices.AsSpan(), results.AsSpan(), period: 14);
Contiguous memory. AVX-512 vectorization. The Garbage Collector sleeps through the whole thing and nobody wakes it.
Python
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) # 447 indicators, similar syntax
Works with NumPy, pandas, polars, and PyArrow. NativeAOT compiled, ships as a binary. No CLR runtime dragged along for the ride.
Full Python guide →
PineScript
Every indicator ships as a standalone .pine file. Open it. Copy it. Paste it into TradingView. No magic, no dependencies, just math that matches the C# and Python versions to the 10th decimal.
Full PineScript guide →
447 Indicators
| 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 | 39 | Signal processing, noise reduction | Kalman, Butterworth, Gaussian, Savitzky-Golay |
| Oscillators | 61 | Bounded/centered oscillators | RSI, MACD, Stochastic, CCI, Fisher, Williams %R |
| Dynamics | 27 | Trend strength and direction | ADX, Aroon, SuperTrend, Ichimoku, Vortex |
| Momentum | 20 | Speed of price changes | ROC, Momentum, Velocity, TSI, Qstick |
| Volatility | 26 | Price variability | ATR, Bollinger Width, Historical Vol, True Range |
| Volume | 28 | Trading activity | OBV, VWAP, MFI, CMF, ADL, Force Index |
| Statistics | 37 | Statistical measures | Correlation, Variance, Skewness, Z-Score |
| Channels | 24 | Price boundaries | Bollinger Bands, Keltner, Donchian |
| Cycles | 18 | Cycle analysis | Hilbert Transform, Homodyne, Ehlers Sine Wave |
| Reversals | 15 | 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 | 36 | Mathematical transforms | Log, Exp, Sigmoid, Normalize, FFT |
| Signals | 12 | Strategy primitives: predicates, triggers, guards | ABOVE, BELOW, ISRISING, ISFALLING |
Architecture (the short version)
Streaming mode: O(1) per update. Fixed memory. State maintained internally. Feed it ticks, get answers. No history buffer, no lookback window allocation, no please pass me the last 200 bars so I can warm-up nonsense.
Batch mode: Structure-of-Arrays memory layout. SIMD vectorized. FMA everywhere the hardware allows. Processes contiguous Span<double> with zero heap allocation. Your profiler will be confused by the absence of GC pressure.
Dual-state management: Bars can be corrected mid-stream (because real-time feeds are liars). The indicator tracks both confirmed and pending state so corrections don't require a full recalculation.
Validation
Every indicator is cross-validated against reference implementations using Geometric Brownian Motion (GBM) generated test data. Not cherry-picked sine waves. Geometric Brownian Motion with realistic drift and volatility, because indicators that only work on textbook inputs are not indicators: they are demos.
Validation matrices →
Error metrics →
Trend comparison →
Documentation
Architecture & API: Architecture · API Reference · Usage Patterns · Integration (Quantower, NinjaTrader, QuantConnect)
Analysis: Benchmarks · Validation · MA Qualities · Glossary
Code Quality Assurance: NDepend · Codacy · SonarCloud · CodeFactor
Stability
In development since 2022. Four years, 700+ commits, 447 indicators — every one cross-validated against at least three independent implementations on realistic GBM data. The public API is frozen: breaking changes fail the build, so your code doesn't wake up one morning to a surprise. Versioning is SemVer with a one-minor-version [Obsolete] deprecation window — deprecate today, remove next release, no guillotine.
Bugs get triaged fast. Open an issue — every report is read, and real bugs jump the queue ahead of the Dependabot noise. Questions, feature ideas, and "why does this number look wrong" all land in the same place. If something is broken and you say nothing, it stays broken. If you say something, it gets fixed.
Where to ask: GitHub Issues — bugs, questions, and ideas all live there. Versioning policy →
License
Apache 2.0. Not MIT. Not BSD. Deliberately →
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- System.Memory (>= 4.6.3)
- System.Numerics.Vectors (>= 4.6.1)
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.12 | 139 | 9/28/2026 |
| 0.8.11 | 373 | 9/23/2026 |
| 0.8.10 | 105 | 9/22/2026 |
| 0.8.8 | 1,871 | 3/16/2026 |
| 0.8.6 | 191 | 3/13/2026 |
| 0.8.4 | 199 | 3/6/2026 |
| 0.7.13 | 1,593 | 11/9/2024 |
| 0.7.12 | 245 | 11/8/2024 |
| 0.7.11 | 253 | 11/5/2024 |
| 0.7.10 | 243 | 11/5/2024 |
| 0.7.9 | 259 | 11/4/2024 |
| 0.7.6 | 259 | 11/3/2024 |
| 0.7.5 | 274 | 11/3/2024 |
| 0.7.4 | 243 | 11/2/2024 |
| 0.7.3 | 250 | 10/30/2024 |
| 0.7.2 | 244 | 10/28/2024 |
| 0.7.1 | 259 | 10/26/2024 |
| 0.7.0 | 244 | 10/25/2024 |
| 0.6.2 | 283 | 10/14/2024 |
| 0.6.1 | 260 | 10/14/2024 |