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 -e .

Optional extras:

pip install -e .[dev]
pip install -e .[talib]
pip install -e .[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.0.tar.gz (23.3 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.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taquant-0.1.0.tar.gz
  • Upload date:
  • Size: 23.3 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.0.tar.gz
Algorithm Hash digest
SHA256 7b68e2a289bc27d8b96a910a069d7c73b3adb065403306903f02f835fd4e1a14
MD5 a50fc2522406ba5d8378b4ba611d7fc4
BLAKE2b-256 2b00526d39b7f2d3201c5e1899041017585a71a0a7995ab72a2bc1009d19463f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taquant-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a61699c8551db3aabdcf69edefd9f3f44471504f3455e6462d6a7a58eb38398
MD5 fe92383e068a1f3980d48f04473b10ed
BLAKE2b-256 adcb314b85d3fa4087dcaf905620615ec7fe70b2dc197fba673f8d6a6ec023fb

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