Skip to main content

High-performance technical analysis indicators with optional SIMD/CUDA and language bindings.

Project description

VectorTA

VectorTA is a Rust crate of 340 implemented technical analysis indicators focused on speed, predictable allocations, and practical execution flexibility, with optional SIMD/CUDA acceleration and optional Python/WASM bindings. In addition to standard single call APIs, much of the library also supports streaming/stateful updates, batch parameter sweeps, and registry-driven dispatch across multiple input and output shapes.

It is intended for workloads where throughput and execution behavior actually matter, including research pipelines, backtesting systems, and high throughput production use cases. The library is not limited to close only, single output indicators either. It spans a wide range of input structures, multi-output studies, and execution paths across Rust, Python, WASM, and CUDA.

The CUDA bindings are predominantly only worth using if used in a VRAM-resident workflow. For example, it is possible to achieve a benchmark timing of 3.129 ms for 250 million calculated ALMA indicator data points on an RTX 4090, whereas the CPU (AMD 9950X) AVX-512, AVX2, and scalar timings are approximately 140.61 ms, 188.64 ms, and 386.20 ms, respectively. The Python bindings also expose GPU-oriented workflows for a subset of indicators, including device-resident outputs intended for high-throughput research pipelines.

The Tauri backtest optimization demo application using this library can achieve 58,300 backtests for a double ALMA crossover strategy over 200k data points in only 85.863 milliseconds on the same hardware (RTX 4090 + AMD 9950X).

For the full indicator list, API reference, and usage guides, see: https://vectoralpha.dev/projects/ta

Install

Add the crate as vector-ta and import it as vector_ta:

[dependencies]
vector-ta = "0.2.5"

For full SIMD functionality on x86_64, use a nightly Rust toolchain and enable the nightly-avx feature. Stable Rust still works for the scalar implementation.

Rust usage

Example: computing ADX from HLC slices

use vector_ta::indicators::adx::{adx, AdxInput, AdxParams};

fn compute_adx(
    high: &[f64],
    low: &[f64],
    close: &[f64],
) -> Result<Vec<f64>, Box<dyn std::error::Error>> {
    let input = AdxInput::from_slices(high, low, close, AdxParams {period: Some(14)});
    Ok(adx(&input)?.values)
}

Features

  • cuda: GPU acceleration using prebuilt PTX for compute_89 shipped in the crate.
  • cuda-build-ptx: compile PTX from kernels/cuda/** using nvcc.
  • nightly-avx: runtime selected AVX2 and AVX512 kernels on x86_64.
  • python: PyO3 bindings built from source with maturin.
  • wasm: wasm-bindgen bindings built from source with wasm-pack.

Python (optional)

Build and install into a virtualenv:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip maturin numpy
maturin develop --release --features python

WASM (optional)

Build the Node-targeted package with wasm-pack:

rustup target add wasm32-unknown-unknown
wasm-pack build --target nodejs --release --features wasm

CUDA (optional)

Enable the CUDA feature:

[dependencies]
vector-ta = {version = "0.2.5", features = ["cuda"]}

Notes:

  • To force-disable CUDA probing/usage (tests/CI): set CUDA_FORCE_SKIP=1.
  • To override where prebuilt PTX is sourced from, set VECTOR_TA_PREBUILT_PTX_DIR (see docs link above).

License

Apache-2.0 (see LICENSE).

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

vector_ta-0.2.5.tar.gz (11.3 MB view details)

Uploaded Source

Built Distributions

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

vector_ta-0.2.5-cp313-cp313-win_amd64.whl (5.7 MB view details)

Uploaded CPython 3.13Windows x86-64

vector_ta-0.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

vector_ta-0.2.5-cp313-cp313-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vector_ta-0.2.5-cp312-cp312-win_amd64.whl (5.7 MB view details)

Uploaded CPython 3.12Windows x86-64

vector_ta-0.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

vector_ta-0.2.5-cp312-cp312-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vector_ta-0.2.5-cp311-cp311-win_amd64.whl (5.7 MB view details)

Uploaded CPython 3.11Windows x86-64

vector_ta-0.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

vector_ta-0.2.5-cp311-cp311-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vector_ta-0.2.5-cp310-cp310-win_amd64.whl (5.7 MB view details)

Uploaded CPython 3.10Windows x86-64

vector_ta-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

vector_ta-0.2.5-cp310-cp310-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file vector_ta-0.2.5.tar.gz.

File metadata

  • Download URL: vector_ta-0.2.5.tar.gz
  • Upload date:
  • Size: 11.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vector_ta-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ffd6e1b82b25a7d31c67258f859b608b792a842e7b009e066dcd71e479f5995f
MD5 9989ed8e1dfc4c85668bb79d993ef4f6
BLAKE2b-256 e3d173aec7856d081e824cb45697b294d27e5039d46ed0cb42c7e73791a8939f

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: vector_ta-0.2.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vector_ta-0.2.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cea670b041796ebe8b4d9ef72db86c17cf7cbd5cf7c00a29dbcab66132029e32
MD5 7d989c0f26f593022014a44415ed9c2b
BLAKE2b-256 a70d7cdadc7b6d76f720c21a4a22df6b764121de5ca950115e51517915b58e0d

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ecb43cdb87ff5ab0700eda608ce9268581e3cce763eb960f0c8b0995ba692f9c
MD5 769cddcc60b84ee6832cb1faf8b0a08c
BLAKE2b-256 a70cb2687ab64153fb197e63882348bc143caeda44e598f0afd45650ec74eeac

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37bbe5c4a55dbf1619e8180662b97ae6d334f111d2847da9facf05b88d9f54b5
MD5 0fad4c57b6a753a67a8e1e36d3da25a9
BLAKE2b-256 e55f831e12fdccc44396fa895649f51113a196a15cbc1b3b4a40fa9e3cc47501

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: vector_ta-0.2.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vector_ta-0.2.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c097a3bcc6759c04579dc40818148fc61d4d71eed4cf277759be48dbba8a1cff
MD5 df48e953dc112074d3d95be7b598e755
BLAKE2b-256 eefff3a396144241ea7f0c3404acfa6b1c28dc6be41dc7a84841f8c2bba824f2

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d92eb8c1db1bee350bc8876115b228f93cb840cc2fd75319a4a0e096950d4fb
MD5 d6b1cde4782427d78f021943804fafd8
BLAKE2b-256 5f9a635ba2581bb4b779d7c4740da627eaf00be5e9de636e28a3cb8b4d50e1b2

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c0dfd2d157b9bc8e2ac82dcab60956e9215ba4702dfbcd07b1afef1c493c73c
MD5 a719cdcdd1a2c1f3fec79f4bf820fc27
BLAKE2b-256 c1654c44ed259f0968a888fa8ccf06ae9a92d43afda5941c7f3e86ea440cc30e

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vector_ta-0.2.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vector_ta-0.2.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bc33858a9e99631b91461e9c5a6ff27df53747891831baa2245ac5de9648e4a4
MD5 ccedde3d40760cfad921917fe6fb9206
BLAKE2b-256 39be14713a3656451dfaa3678bb52e5b6edfeb631589b9a53ff171c87934e9dd

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd2067982a21d24ac6efff7829f16a89e93a1198db6e56c64acce9f959d26652
MD5 f40ae367d4f986f07f6ebd2622534d57
BLAKE2b-256 a905fc0b61a7af28a4c32ecc75d25396a67146cd8ba0efab4515a799f2b0f640

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4dad940055d2246b3beef9ef5b448a1e0518d651108a28717c8e95401aa53de0
MD5 7fa7c7758b69701b726ff7d4b0179e94
BLAKE2b-256 5aaa127ca46626e875a64246f6a8444bdaa55494a463af1be2f4c4b0cf4d6241

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: vector_ta-0.2.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vector_ta-0.2.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 49f6d24f042fbb4a3f3a5e63d79937d58f9ca27ac2bef41d2e1d8fc4487dda9e
MD5 e1c3d5d18a50c3b55681d0c6163f4d99
BLAKE2b-256 69ebb93ce3bda18f231848d1a9d3a73ebda73618e2fbcd48988cffe8d2f568fb

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e60a923709df451fdbaa4ef5a877fa0d0ac321904678ed5729a342572ff803a
MD5 42d7c125a19b3aa6010bf53956edf312
BLAKE2b-256 c17b3610fd1a92afe71c44c2b10b226d9face96ec87651bae4a4be606d004b86

See more details on using hashes here.

File details

Details for the file vector_ta-0.2.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vector_ta-0.2.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d6b449a9f7bb255049fea37ddc6a6c6de0f985795d1bf2833ba4647c47cee72
MD5 6ee5acbc2ee242c20ae9692565af5ad1
BLAKE2b-256 c63b5af346f9f5b242bc02e8ce1bd8d9b078448f14afa533efa9b14059bf203d

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