Skip to main content

quantalib

PyPI Python License

393 technical analysis indicators compiled to native code via .NET NativeAOT, called from Python through ctypes. Same SIMD-accelerated engine as the QuanTAlib .NET package. Zero Python math reimplementation.

pip install quantalib

Quick Start

import numpy as np
import quantalib as qtl

close = np.random.default_rng(42).normal(100, 2, size=500)

sma = qtl.sma(close, period=20)
rsi = qtl.rsi(close, period=14)
upper, mid, lower = qtl.bbands(close, period=20, std=2.0)

Works with pandas, polars, and pyarrow — same-type-in, same-type-out:

# pandas — preserves index
import pandas as pd
s = pd.Series(close, name="close")
rsi = qtl.rsi(s, period=14)        # → pd.Series

# polars — zero-copy-friendly
import polars as pl
s = pl.Series("close", close)
rsi = qtl.rsi(s, period=14)        # → pl.Series
bb  = qtl.bbands(s, period=20)     # → pl.DataFrame (upper, mid, lower)

# pyarrow — for Arrow-native pipelines
import pyarrow as pa
a = pa.array(close, type=pa.float64())
rsi = qtl.rsi(a, period=14)        # → pa.Array

pandas-ta users: length= is accepted everywhere as an alias for period=.

Install optional backends:

pip install quantalib[pandas]       # pandas / pd.Series support
pip install quantalib[polars]       # polars / pl.Series support
pip install quantalib[pyarrow]      # pyarrow / pa.Array support
pip install quantalib[all]          # all three

Performance (500,000 bars, AVX-512)

Indicator quantalib pandas-ta Ratio
SMA 328 μs ~50 ms ~150×
EMA 421 μs ~45 ms ~107×
WMA 302 μs ~60 ms ~199×
RSI 517 μs ~80 ms ~155×

The ctypes call adds 5-15 μs overhead. For arrays above a few hundred bars, NativeAOT wins by two orders of magnitude.

Categories

Category Module Examples
Channels channels bbands, kc, dc, aberr
Core core ha, midpoint, avgprice, typprice
Cycles cycles ht_dcperiod, ht_sine, cg, dsp
Dynamics dynamics adx, aroon, ichimoku, supertrend
Errors errors mse, rmse, mae, mape, huber
Filters filters kalman, sgf, hp, butter2, wavelet
Momentum momentum rsi, macd, roc, mom, tsi
Numerics numerics fft, normalize, sigmoid, slope
Oscillators oscillators stoch, cci, fisher, qqe, willr
Reversals reversals sar, pivot, fractals, swings
Statistics statistics zscore, correl, entropy, linreg
Trends FIR trends_fir sma, wma, hma, alma, trima
Trends IIR trends_iir ema, dema, tema, kama, jma
Volatility volatility atr, bbw, stddev, hv, tr
Volume volume obv, vwma, mfi, cmf, adl

Requirements

  • Python 3.10+
  • NumPy >= 1.24
  • Pre-built wheels: win-x64, linux-x64, osx-x64, osx-arm64

Optional dependencies

Extra Minimum version Enables
pandas ≥ 1.5 pd.Series / pd.DataFrame round-trip
polars ≥ 0.20 pl.Series / pl.DataFrame round-trip
pyarrow ≥ 14.0 pa.Array / pa.ChunkedArray round-trip

License

Apache License 2.0

Metadata

Release files for quantalib 0.8.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for quantalib 0.8.11
File
quantalib-0.8.11-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
quantalib-0.8.11-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
quantalib-0.8.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
quantalib-0.8.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
quantalib-0.8.11-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
quantalib-0.8.11-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details

Total release size: 26.6 MB

Release files / quantalib-0.8.11-py3-none-win_arm64.whl

Download URL quantalib-0.8.11-py3-none-win_arm64.whl
Size 3.5 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
a0f2a7f898617f7ac59dc14f217a9df7e8105f94a4faf790c18bdbb859d55eb5
BLAKE2b-256 checksum
How to use checksums
1e5e6ab453e8676baf06a9a57e2193f16512cf6347ed65d02dc814d825b75481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quantalib-0.8.11-py3-none-win_amd64.whl

Download URL quantalib-0.8.11-py3-none-win_amd64.whl
Size 3.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
5d55ac0861275990fdd338943ee0ff37d2d05361e72706d3ff0c9c9fb41248ee
BLAKE2b-256 checksum
How to use checksums
9f97786b2e9bf7589b61ce45d1d96137765e57817bb70d854733301ba08a0fac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quantalib-0.8.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL quantalib-0.8.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
94d5cd95ffd6878df48abd1d6233eeb8de39af764feb1a6ccb2f96f641134204
BLAKE2b-256 checksum
How to use checksums
4ac34048bce715917bd1c9068ea9e298d5fc8369395fd186d1ce8a27e8ca74b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quantalib-0.8.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL quantalib-0.8.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 3.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
e34931a81eeeda5631852165843031d768b9008b44d9ec54dba077829e16261f
BLAKE2b-256 checksum
How to use checksums
a013353a25a0cff02a9c2637df8889f53c86abd451279c8fee124b8798d570d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quantalib-0.8.11-py3-none-macosx_11_0_arm64.whl

Download URL quantalib-0.8.11-py3-none-macosx_11_0_arm64.whl
Size 5.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e7debdec08df072a033c02b0bd34fb549c5e7a1668d6d22156f771fb00b5272
BLAKE2b-256 checksum
How to use checksums
a4e0f9de3872ff444e10919c87006e9a41a4be0f1383db0498147b30fe9b7d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quantalib-0.8.11-py3-none-macosx_10_13_x86_64.whl

Download URL quantalib-0.8.11-py3-none-macosx_10_13_x86_64.whl
Size 6.2 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
af999092e9ff91bc887a4b0a43597247225114fd8682e614054e93264e584557
BLAKE2b-256 checksum
How to use checksums
234f1346c858ba182ad97c35b90ad403d87137249b327aefd864fc61c04e6402
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.8.12

6 release files

This release

0.8.11 This release

6 release files

0.8.10

6 release files

0.8.8

6 release files

0.8.6

6 release files

0.8.4

6 release files

0.8.2

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page