Skip to main content

High-performance technical indicator library

Project description

TAQuant

TAQuant is a high-performance technical indicator library for quantitative research and trading systems. It uses a layered design:

  • pandas for user-facing API
  • numpy arrays for heavy computation
  • numba kernels for hot loops

TAQuant targets:

  • large batch backtests (100k to 1M rows)
  • multi-symbol processing
  • realtime incremental updates via stateful classes

Installation

pip install .

Optional extras:

pip install ".[dev]"
pip install ".[talib]"
pip install ".[benchmark]"

Quickstart

import pandas as pd
import taquant

# df contains: Timestamp, Open, High, Low, Close, Volume
out = taquant.trend.ema(df, window=20)
out = taquant.momentum.rsi(out, window=14)
out = taquant.volatility.bollinger_bands(out, window=20, num_std=2.0)

# Warm-path mode: skip runtime validation overhead
out = taquant.trend.ema(df, window=20, fast_mode=True)

API Examples

from taquant.trend import sma, ema, wma, macd
from taquant.momentum import rsi, stochastic, cci
from taquant.volatility import stddev, atr, bollinger_bands
from taquant.volume import volume_ma, obv, vwap
from taquant.price import typical_price, median_price, weighted_close

sma(df, window=20)
ema(df, window=20, symbol_col="Symbol")
macd(df, fast_window=12, slow_window=26, signal_window=9)

Array-native API (ndarray -> ndarray, no DataFrame overhead):

from taquant import array_api as fa

ema = fa.ema_array(close, window=20)
rsi = fa.rsi_array(close, window=14)
line, signal, hist = fa.macd_array(close, 12, 26, 9)

Stateful realtime usage:

from taquant.stateful import EMAState, RSIState

ema_state = EMAState(window=20)
rsi_state = RSIState(window=14)

ema_value = ema_state.update(price)
rsi_value = rsi_state.update(price)

Benchmark Highlights

From benchmark/results/speedup_summary.csv (warm mode, single_1m, speedup vs pandas):

  • SMA: 2.04x
  • EMA: 3.45x
  • MACD: 6.39x
  • RSI: 4.61x
  • BBANDS: 5.72x

Artifacts:

  • benchmark/results/benchmark_summary.csv
  • benchmark/results/speedup_summary.csv
  • benchmark/results/runtime_speedup.png
  • benchmark/results/metadata.json

Design Philosophy

  • Performance-first compute paths on ndarray(float64)
  • Deterministic, explicit validation and error messages
  • Reusable base abstraction (apply_indicator) for consistent APIs
  • Dependency-aware caching to avoid redundant recompute
  • Maintainable architecture over over-engineering

Project details


Download files

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

Source Distribution

taquant-0.1.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

taquant-0.1.1-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file taquant-0.1.1.tar.gz.

File metadata

  • Download URL: taquant-0.1.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for taquant-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d75d07c3d18871f1ca17c42bb4c25e132b50b0d6e82c3a11214171b45d8bd3e5
MD5 1c8eb3be99ba9569b15834e7d2ea63f9
BLAKE2b-256 25f0d65adb1f63ce2ef75146a7369ed10bfa31ec0cb13bc9ecd5b8ba339d109e

See more details on using hashes here.

File details

Details for the file taquant-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: taquant-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for taquant-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fde062b45de5e99edd349bd5ce71ab131014d2ce4e5f48767f5f718117274ea
MD5 a72b3f8dd5199570e7fe739b4afc5b71
BLAKE2b-256 2be09b97f187eb86c0a081e6678b6c35d51084360cc68589d6edfa5bc5fa8157

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