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.8"

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.8", 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.8.tar.gz (8.5 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.8-cp313-cp313-win_amd64.whl (8.0 MB view details)

Uploaded CPython 3.13Windows x86-64

vector_ta-0.2.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

vector_ta-0.2.8-cp313-cp313-macosx_11_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vector_ta-0.2.8-cp312-cp312-win_amd64.whl (8.0 MB view details)

Uploaded CPython 3.12Windows x86-64

vector_ta-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

vector_ta-0.2.8-cp312-cp312-macosx_11_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vector_ta-0.2.8-cp311-cp311-win_amd64.whl (8.0 MB view details)

Uploaded CPython 3.11Windows x86-64

vector_ta-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

vector_ta-0.2.8-cp311-cp311-macosx_11_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vector_ta-0.2.8-cp310-cp310-win_amd64.whl (8.0 MB view details)

Uploaded CPython 3.10Windows x86-64

vector_ta-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

vector_ta-0.2.8-cp310-cp310-macosx_11_0_arm64.whl (7.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vector_ta-0.2.8.tar.gz
  • Upload date:
  • Size: 8.5 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.8.tar.gz
Algorithm Hash digest
SHA256 9b27228e55622c5994baf1f36a091d1ecb18f681b50ff0f546c1ee3fc5d48c5c
MD5 c42713a85813b20af8794b3ce1a88107
BLAKE2b-256 3e2684d8ae97bc8fe40fd043af3db44753dd5d85779693eb8823ba8778981c88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 8.0 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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4160c6c8fda61d425745b6815e134f9b7ef5aec966d1d9548c1072f2aac9b265
MD5 877ad041cb105ab1c04ac6fd7c70e070
BLAKE2b-256 6b1b2a48a716bac82d25ce9ecbbf9b7b30f503fe31471ae512a2e58eeb43e96c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e844ca41a979eec5d04dde87385f37226c58e42996d382e82c3b93da5b6e08d
MD5 e588471d80b8e5fbc3a08d1d719a0cb5
BLAKE2b-256 a881c4a4eedb404fc44268d2bd15b09c3e164f2cbe19be8bb9cacb859f775c3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb92e91a7608fb8ac02c6dd697fe7c00aff753777977c7258cf4d177cfc42a57
MD5 d7cbaba771ca9bea8c1fc965caa4b816
BLAKE2b-256 4a689822465f9f87beb511ab7859f8f5c728c79c0bb0a3b66dcbd30bdc4bc088

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 8.0 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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 76c06bd12e74e68c3a3d3fffbe6249c120ceb1982e8f35ecfa25d7b6e5e5f89f
MD5 3b364671994ed4ecaea2dc895de54541
BLAKE2b-256 d2f2e72451476fe870ad769f268de71f46d4c8043e89351d65d3a881938a55ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 921947f1755cb1cac754729ca093452b92a1a04fa29bddbd457d7043db44ee7e
MD5 a50f62f30408d5c834f30d5d42c8b779
BLAKE2b-256 9a149ba250c03b47c396e0600a2ffddd41b62d60c983561c5bceba13003947ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc9ea50d8c77ba9744b5ff1cc479eeff5e61f6bae2b95d3ad860f13e2ab6d0e0
MD5 638a5e823710c8dd04f2336c63f444e1
BLAKE2b-256 4ae783572f939c4a9e16dd261e3932a2e36dabffaac2cff21bc4fdbe9d5c4f16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 8.0 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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 931df862b07210486c0605f68d33cdae4bda384686bd78dae35914832c1c980e
MD5 6ff553681e8b65e6f903e2852bff00f3
BLAKE2b-256 4c8cf4a0e841c88b7f10bcb73701956911232ccdee0659e080837f31163fa9a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38b5fc2ebb4d7dff31748606cb1b4855b54ba47192f7997c4158ce35e3d58786
MD5 b8abe82c44fd09baa23307e481186a95
BLAKE2b-256 e6419f0ddee9add0c8707507ec2be880deefa657c0e2ad3ee7faeabac4da6c8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a94434a25f5b6a3a3188a64720dc9cad7c7d1c904683906d22b6f1f43928b2da
MD5 5764cb3f0213befb29385e83bc3f8de4
BLAKE2b-256 2e113ee3303e94d36448b1d9420976d2ed5654318ab2ad101426ef2e09bf47c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 8.0 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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a926927aa0e38899505c8d445abfb5cfc3c3013de6c93604147fb8465404e52d
MD5 039b26d7a6ce6e2ffa3cb67d12023d4c
BLAKE2b-256 3865a6a35e7d792147a5692e785f2a06cf3f7611e38b2fbe4a16dbe68cc8e043

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb2368c387d4931b5af8da7bbf6fcd1793caddaafff915506863fc117584b905
MD5 48fbdbf0caf5246ed8f46cdf82c7a797
BLAKE2b-256 352d39a630ecafafd088854a4f33c341aef03ed09005399ab196a96c6085646f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4046b697beb8f0d259f0ccf4898a24cf9697a05847793a7d9ebdfe2b273035e
MD5 bd5de9c10ff22a12799a5a77d6ec4be0
BLAKE2b-256 a2bffcaaa48f1e5834ab116e274ebb140513b90c6d083b9ec38e810729e9d410

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