Skip to main content

High-performance technical analysis wrappers over QuanTAlib NativeAOT

Project description

quantalib — Python NativeAOT Wrapper

High-performance Python wrapper for QuanTAlib, a .NET NativeAOT technical analysis library.

Features

  • ~391 indicators across 15 categories: channels, core, cycles, dynamics, errors, filters, momentum, numerics, oscillators, reversals, statistics, trends (FIR & IIR), volatility, volume
  • Zero-copy FFI — ctypes bridge to pre-compiled NativeAOT shared library
  • NumPy native — all inputs/outputs are float64 arrays
  • Optional pandas support — pass pd.Series in, get pd.Series out with preserved index
  • pandas-ta compatiblequantalib._compat provides alias mapping for drop-in migration

Installation

pip install quantalib

Note: The NativeAOT shared library (quantalib_native.dll / .so / .dylib) must be present in quantalib/native/<platform>/. Pre-built binaries are included in wheel distributions.

Quick Start

import numpy as np
import quantalib as qtl

close = np.random.randn(200).cumsum() + 100

# Simple Moving Average
sma = qtl.sma(close, length=20)

# Bollinger Bands (multi-output → tuple or DataFrame)
upper, mid, lower = qtl.bbands(close, length=20, std=2.0)

# With pandas
import pandas as pd
s = pd.Series(close, name="close")
rsi = qtl.rsi(s, length=14)  # returns pd.Series with preserved index

Categories

Category Module Examples
Channels channels bbands, kchannel, dchannel, 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 psar, pivot, fractals, swings
Statistics statistics zscore, correlation, 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

Local Development

cd python/
python -m venv .venv && .venv/Scripts/activate  # or source .venv/bin/activate
pip install -e ".[dev]"
pytest

Building the native library

dotnet publish python.csproj -c Release

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

quantalib-0.8.2-py3-none-win_arm64.whl (3.3 MB view details)

Uploaded Python 3Windows ARM64

quantalib-0.8.2-py3-none-win_amd64.whl (3.6 MB view details)

Uploaded Python 3Windows x86-64

quantalib-0.8.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

quantalib-0.8.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (3.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

quantalib-0.8.2-py3-none-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

quantalib-0.8.2-py3-none-macosx_10_13_x86_64.whl (5.8 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

Details for the file quantalib-0.8.2-py3-none-win_arm64.whl.

File metadata

  • Download URL: quantalib-0.8.2-py3-none-win_arm64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quantalib-0.8.2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 5b417285f537882d88fbf9662cc73670926cb2ea584fa65b0d6cb915f0a863b9
MD5 3646a2c1dc3ebd4c132c0071979fddce
BLAKE2b-256 cc13c173922858c02ef7f6f9dfdf3a683ff6bb6d24faa89c1e450d8d06c69b61

See more details on using hashes here.

File details

Details for the file quantalib-0.8.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: quantalib-0.8.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quantalib-0.8.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6264e64d2c198602dcdfa2dd503d4fdab9049ab84a9901f764e66c0c2d632cf5
MD5 d1e3faf9ef7f55f6a26d70677dd51f0b
BLAKE2b-256 da619b2b7bc1d696a7682eb6a246f83af163d98d54871e4e9d30b5ea1fa419af

See more details on using hashes here.

File details

Details for the file quantalib-0.8.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for quantalib-0.8.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4c17b797e0af1072979b50429d4b54dffea1e4cd3d05d8f5d100a084d029bcd1
MD5 28c0a8b7d0598ce6790a8d590c79941d
BLAKE2b-256 19a3e6a385b57b4affa26974f03a98ec923e05090cac3d7b9f8217ba6fdbe0b1

See more details on using hashes here.

File details

Details for the file quantalib-0.8.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for quantalib-0.8.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 cd5b1b022e3f6740c393c7d8ad63ecdd1e5fc1faa3ac890503bc6c106d111b4d
MD5 24c0c841ee096d3804e8a95ce8721fd3
BLAKE2b-256 b93db5622f70c3ad3091f0d352d059190a7d9e5a91ee8cbf1a1a04afc2b6a743

See more details on using hashes here.

File details

Details for the file quantalib-0.8.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantalib-0.8.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 776a18503165f03ecf1b33f8cb96adc1cd5246709538fd78c1cb1c634597e103
MD5 34256fecb8095b60c399e5c941f36bb4
BLAKE2b-256 37b633a78927ddc28ae4b3cb2b78584b48df3587807f10c801b69e293459bf4c

See more details on using hashes here.

File details

Details for the file quantalib-0.8.2-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for quantalib-0.8.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4ba33715add667820323d60e6e1b210d528ef8595f38cdf1e686220a1243e03e
MD5 3967249ca8b64276b34240f9a10d4032
BLAKE2b-256 9ee03988a8943034fba3d82694835ecd57546ea65cad5e1f550b0883cc12ec0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page