2026-01-18 19:02:03 -08:00
[](https://app.codacy.com/gh/mihakralj/QuanTAlib/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://codecov.io/gh/mihakralj/QuanTAlib)
[](https://sonarcloud.io/summary/new_code?id=mihakralj_QuanTAlib)
[](https://www.codefactor.io/repository/github/mihakralj/quantalib/overview/main)
[](https://www.nuget.org/packages/QuanTAlib/)

[](https://www.nuget.org/packages/QuanTAlib/)
[](https://dotnet.microsoft.com/en-us/download/dotnet)
2026-02-26 22:02:52 -08:00
[](lib/_index.md)
2026-03-03 09:22:55 -08:00
[](docs/ndepend.md)
[](docs/ndepend.md)
[](docs/ndepend.md)
[](docs/ndepend.md)
[](docs/ndepend.md)
[](docs/ndepend.md)
2026-01-18 19:02:03 -08:00
2026-03-03 09:22:55 -08:00
Static code analysis provided by [ndepend ](https://www.ndepend.com/ )
2026-02-16 16:54:36 -08:00
2026-01-18 19:02:03 -08:00
# QuanTAlib - Quantitative Technical Indicators Without Compromises
TA libraries face a fundamental choice: accept approximations for simplicity OR enforce math rigor. QuanTAlib chooses rigor.
**Quan**titative **TA** **lib**rary (QuanTAlib) is a C# library built on the premise that you shouldn't have to choose. Modern CPUs process 4-8 FLOPS per cycle via SIMD. Modern .NET exposes memory layouts making hardware acceleration trivial. QuanTAlib exploits both. **Result:** mathematically rigorous indicators at speeds making real-time multi-symbol analysis practical on ordinary hardware.
## Key Features
- **Zero Allocation**: Hot paths are allocation-free. No GC pauses during trading.
- **SIMD Accelerated**: Uses AVX2/AVX-512 for 8x throughput on modern CPUs.
- **O(1) Streaming**: Constant time updates regardless of lookback period.
- **Platform Agnostic**: Runs on .NET 8/9/10, compatible with Quantower, NinjaTrader, QuantConnect.
- **Mathematically Rigorous**: Validated against original research papers and established libraries.
## Indicators
2026-02-15 21:59:03 -08:00
| Category | Count | What It Measures | Representative Indicators |
| -------- | :---: | ---------------- | ------------------------- |
2026-02-26 22:02:52 -08:00
| [**Trends (FIR)** ](lib/trends_FIR/_index.md ) | 33 | Finite Impulse Response moving averages | SMA, WMA, HMA, ALMA, TRIMA, LSMA, TSF |
| [**Trends (IIR)** ](lib/trends_IIR/_index.md ) | 36 | Infinite Impulse Response moving averages | EMA, DEMA, TEMA, T3, JMA, KAMA, VIDYA |
| [**Filters** ](lib/filters/_index.md ) | 37 | Signal processing and noise reduction filters | Bessel, Butterworth, Gaussian, Savitzky-Golay, Ehlers Super Smoother |
| [**Oscillators** ](lib/oscillators/_index.md ) | 47 | Indicators that fluctuate around a center line | RSI, MACD, Stochastic, AO, APO, CCI, Ultimate Oscillator |
| [**Dynamics** ](lib/dynamics/_index.md ) | 21 | Trend strength and direction indicators | ADX, Aroon, SuperTrend, Vortex, Chop, Ichimoku, RAVI |
2026-02-23 17:27:35 -08:00
| [**Momentum** ](lib/momentum/_index.md ) | 19 | Speed and magnitude of price changes | Momentum, ROC, Velocity, RSX, Qstick, KDJ |
2026-02-26 22:02:52 -08:00
| [**Volatility** ](lib/volatility/_index.md ) | 26 | Size and variability of price movements | ATR, Bollinger Band Width, Historical Volatility, True Range |
| [**Volume** ](lib/volume/_index.md ) | 27 | Trading activity and price-volume relationships | OBV, VWAP, MFI, ADL, CMF, TVI, Force Index |
| [**Statistics** ](lib/statistics/_index.md ) | 33 | Statistical measures and tests | Correlation, Variance, StdDev, Skewness, Kurtosis, Z-Score |
| [**Channels** ](lib/channels/_index.md ) | 23 | Price boundaries and range definitions | Bollinger Bands, Keltner Channels, Donchian Channels |
| [**Cycles** ](lib/cycles/_index.md ) | 14 | Cycle analysis and signal processing | Hilbert Transform, Homodyne, Phasor, Ehlers Sine Wave |
| [**Reversals** ](lib/reversals/_index.md ) | 12 | Pattern recognition and reversal detection | Pivot Points, Fractals, Swings, Pivot Components |
| [**Forecasts** ](lib/forecasts/_index.md ) | 1 | Predictive indicators and projections | Time Series Forecast |
| [**Errors** ](lib/errors/_index.md ) | 26 | Error metrics and loss functions | RMSE, MAE, MAPE, SMAPE, MASE, R-Squared |
| [**Numerics** ](lib/numerics/_index.md ) | 27 | Mathematical transformations | Log, Exp, Sqrt, Tanh, ReLU, Sigmoid |
| [**Core** ](lib/core/_index.md ) | 7 | Price transforms and fundamental building blocks | AVGPRICE, MEDPRICE, MIDPRICE, TYPPRICE, WCLPRICE |
2026-02-15 21:59:03 -08:00
2026-02-26 22:02:52 -08:00
** [Browse all 393 indicators → ](lib/_index.md )**
2026-01-18 19:02:03 -08:00
## Quick Start
Install from NuGet:
```bash
dotnet add package QuanTAlib
```
Calculate an SMA in real-time:
```csharp
using QuanTAlib ;
var sma = new Sma ( period : 14 );
double price = 100.0 ;
// Update with new price
var result = sma . Update ( new TValue ( DateTime . UtcNow , price ));
if ( result . IsHot )
{
Console . WriteLine ( $"SMA: {result.Value}" );
}
```
## Performance Snapshot
QuanTAlib is designed for speed. Here is how it compares calculating a 500,000 bar SMA against other libraries:
| Library | Mean Time | Allocations | Relative Speed |
| ------- | --------- | ----------- | -------------- |
| **QuanTAlib (Span)** | **318.3 μs** | **0 B** | **1.00x (baseline)** |
| TA-Lib | 356.4 μs | 34 B | 1.12x slower |
| Tulip Indicators | 359.3 μs | 0 B | 1.13x slower |
| Skender Indicators | 71,277 μs | 50.8 MB | 224x slower |
*See [Benchmarks](docs/benchmarks.md) for full details and methodology.*
## Documentation
### Core Concepts
- [**Architecture** ](docs/architecture.md ): Learn about SoA layout, SIMD, and design philosophy.
- [**API Reference** ](docs/api.md ): Deep dive into the Tri-Modal Architecture (Batch, Streaming, Priming).
- [**Indicators** ](docs/indicators.md ): Full catalog of available indicators and their mathematical families.
- [**Usage Guides** ](docs/usage.md ): Detailed patterns for Span, Streaming, Batch, and Eventing modes.
- [**Integration** ](docs/integration.md ): Setup guides for Quantower, NinjaTrader, and QuantConnect.
### Analysis & Validation
- [**Benchmarks** ](docs/benchmarks.md ): Detailed performance evidence and test methodology.
- [**Error Metrics** ](docs/errors.md ): Implementation details for 20+ error metrics and loss functions.
- [**Trend Comparison** ](docs/trendcomparison.md ): Comparative analysis of lag, smoothness, and accuracy.
- [**MA Qualities** ](docs/ma-qualities.md ): Theoretical framework for evaluating moving averages.
- [**Validation** ](docs/validation.md ): Verification matrices against TA-Lib, Skender, and other libraries.
- [**Glossary** ](docs/glossary.md ): Definitions of core QuanTAlib concepts, types, and terminology.