Miha Kralj 813e9451e6 docs: add GitHub issue forms
Bug, indicator-request, and validation-mismatch forms, plus a Q&A discussion link.
2026-09-27 18:00:14 -07:00
2026-09-27 18:00:14 -07:00
2026-09-23 14:53:01 +02:00
2026-03-16 12:45:13 -07:00

Codacy grade codecov Security Rating CodeFactor Nuget GitHub last commit Nuget

.NET Indicators

QuanTAlib

447 technical indicators. One library. Brutal architectural trade-offs for absolute speed.

⭐ Documentation pages →

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.

Full benchmarks →

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

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

Browse all 447 indicators →

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.

Full architecture docs →

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 →

Languages
C# 97.8%
Python 2.1%