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

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

Uploaded CPython 3.13Windows x86-64

vector_ta-0.2.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

vector_ta-0.2.7-cp313-cp313-macosx_11_0_arm64.whl (6.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vector_ta-0.2.7-cp312-cp312-win_amd64.whl (7.8 MB view details)

Uploaded CPython 3.12Windows x86-64

vector_ta-0.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

vector_ta-0.2.7-cp312-cp312-macosx_11_0_arm64.whl (6.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vector_ta-0.2.7-cp311-cp311-win_amd64.whl (7.8 MB view details)

Uploaded CPython 3.11Windows x86-64

vector_ta-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

vector_ta-0.2.7-cp311-cp311-macosx_11_0_arm64.whl (6.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vector_ta-0.2.7-cp310-cp310-win_amd64.whl (7.8 MB view details)

Uploaded CPython 3.10Windows x86-64

vector_ta-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

vector_ta-0.2.7-cp310-cp310-macosx_11_0_arm64.whl (6.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vector_ta-0.2.7.tar.gz
  • Upload date:
  • Size: 8.4 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.7.tar.gz
Algorithm Hash digest
SHA256 5074d1f768e35b4442a08db262582a47034741823baffb840d64b930f454faee
MD5 a8f99fbfe49f343b9bcf446b79aedb3f
BLAKE2b-256 d8e33f6cebf626aee1cbdf3246d1c3c873cb89844a5d1cbbf89aca0a23be734d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 7.8 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.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dd7edf39e8a904ab22db470625653f01d2e225b477c24cf5fe3ada5706e95125
MD5 d2be2438971a91f976ae3def9f4cba4c
BLAKE2b-256 88f5d94a2acc161e8c4e32001fa502840918eae9cc25894be802d54b36bd8b09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c340c42e2d830ebe221cd285517dc873564794a261200887251898a571a6051
MD5 d9b1e6506f990aeebb6f59f36e9a1b43
BLAKE2b-256 f787042b26119f8c379f5bde54e1337e1f20a692596d94352918e3ebf9b01a61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 838374466e2fd125580bbed8029671867730782f554448a91ac06c4a003641b9
MD5 19ef6cddaa63105d2ce6be16c4b200ac
BLAKE2b-256 ad3db541dd3bb097e8668d4a47976ef0c81c5396521034009cb1f47f4422f35b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 7.8 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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b201c60346be3411681f945ffecdc421b4a7a6e4d84a9eeaae8da40c409133ce
MD5 1dba912bab2decc261ceea29183218ba
BLAKE2b-256 4a052726dc4c671004d55e00562c2d29361fb9e65f3a8bdf3f7fbda2d5a7ad5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0ddcafebbd965239ac2a312d6dec6e7786398d729cc6bf6e7150a71ecbae418
MD5 45f2d15849c8c10442a77567fc094b5f
BLAKE2b-256 3d2c4f4bbfce64ad120c61bbe8950b1355e75b344a8289b9ae992a7ff583eb56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e3924a3c0e61c4e8fa8c3bd7d31732f9e1fdbdfdafb839e3f2ed82014a2834f
MD5 f10c54031c441cf1c46d427d50562a16
BLAKE2b-256 b4f02cc2e3e6a9aa873fb62c28274d4322600d09088593c18af8806a9c5ca410

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 7.8 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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 419194b27e893f8a063df3eecaa2d610b75f62f13cd7c0aaf5e463063c024fd9
MD5 40648cdf4ef2885d73045acec5707f6d
BLAKE2b-256 a1b07c4f7af192511bbe74707d066df3eb52ceec6c3efaa917be4fdb16b8d362

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c7316ac7190634de368d6ff3c431e8f0b5169462898a13e51e421f70265e809
MD5 aadecb1f2129920fdbcee9db76b5ed08
BLAKE2b-256 366d77459fc219850a15c45ef3c0100fcd9d6611032af43e6c8bf7e8ce101a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6fdaa5c0d0e1f84a9f9c388b3cef8316a5c2165d7b748c8578efc478f91afeb
MD5 4263150ef82388b535b97add9c86b9c3
BLAKE2b-256 c8fd338c3c3152978dfe1c600c33a40e966c26b00075fede5d15a25221f08476

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 7.8 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.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7575e1c2d89deafbfd36f5e58c4701976a18b56c5ed91f77c37b3c393e90dc99
MD5 214d91a237a351bf3ade1c6fedeffb71
BLAKE2b-256 a0521721d6b2225068e199856215962430f8b35731c053ebd8a5d3e258520e81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11348d4c43c7243adb22b94eba755e06cf99c570ad21cf02d6fc93036220382b
MD5 0f3e580ef58696ddf4b839b6bbdca5ba
BLAKE2b-256 38b7b3b3bf81f739aa25230f6372a95cb1cd8021dff09029332808b94832e046

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a7ff510d240d32b663365f884f3265cecd45045b666960e1dad992fb0585533
MD5 483890c5355623604aade4111d83bb57
BLAKE2b-256 676cd4bb6197e9dcb6bda67c11b14fc4854848924f9f91afec5340fd72359156

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