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

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

Uploaded CPython 3.13Windows x86-64

vector_ta-0.2.3-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.3-cp313-cp313-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

vector_ta-0.2.3-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.3-cp312-cp312-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

vector_ta-0.2.3-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.3-cp311-cp311-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

vector_ta-0.2.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for vector_ta-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e1b13552596696712569e440fc198efbab7e86fd8641597513e2d6440ba7d46a
MD5 f9c0f25fdf630b4eb8cda3ab36912d86
BLAKE2b-256 92572a4361b92a7f1725fdd735c6f15d28b23824acdd91f9d6deb5a541d8806a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.3-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.7

File hashes

Hashes for vector_ta-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 db3416e70aef9a3ff4169de2aa3e41a6e77ba9c66323205af7114b9e0212f869
MD5 b1f730a2e4495bf93ddf9832f9c18a0f
BLAKE2b-256 3300bceabd4b4edf6bc8fd194e9f2b9806257d3a8c2126d8c08e934c95383e9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46036830d660eb086931cb610820e88a0fa4e139ae04849f8ccd9eee9f533813
MD5 212d428f419e6f64ddf029634c25f1f2
BLAKE2b-256 1afe26d9a2d0fed037108f88d9660ace309e613c3d7d8a8abf19cb30f327930d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b814ffb049d1300cebafdc0d523d2e956819c3a8035655d926053e74a540938e
MD5 94d3be6f301866dd82002ed4dc9d3e0b
BLAKE2b-256 3a7e1fbeecf378374bc5e3518e3ccb3890a774b67865b981bc014f755c90cdfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.3-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.7

File hashes

Hashes for vector_ta-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e1c0e8654c494296feb7254450e5c92ad9de03ac8d2ba9818d2f8fb020a3321d
MD5 1eec00ff0a70948951737edac1af4dd6
BLAKE2b-256 b8e603efedb0f6236819b155f6c1a02a2b56e682ee37534eef0abd91eb98c682

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db0165f29ba4ded3d9484ee093537798a15f667d744ffc7a60b6deaecd08dc81
MD5 7838121c6e38785bc5bb5bd5e87a30fa
BLAKE2b-256 42a105fdb81becdb47503c8d34e2046281d76b8ba4a25d61883c45fdfc93b216

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2eb9688ba429dc1cba3e8d31b12ee41b123b8c0cbbcbb6b91677d69c8019f511
MD5 25f9066d1dce0a53c4e353d94544494a
BLAKE2b-256 bc63680a4b344b1a05a7a6b86315f0eab141a75308f2244cb1a85be878111533

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.3-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.7

File hashes

Hashes for vector_ta-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2b2ac06a689963bd6f24012402258254047da532900dc76af08260acedb4fba0
MD5 d465ffeb192c436755cce181dc7294cb
BLAKE2b-256 10609b1f57bd31bd3689fe1a0726f3f00409fa67e226218cdb85e7b240b77c98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8dd6ae4699f11e6b45ad8dd414fc3f55c9be94ad87b8c777f12a076a625b80e
MD5 5800d87da8c44cb599e6260374febef1
BLAKE2b-256 f60f945f77365c9353a012a1a0cc2528dfd7bbcbd0ee50c0904326ca145e4ac0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c88a9ac0af537b80ed6d28db983bc9eca4dec11cd43c8f63f7c872f3177db90
MD5 c228abad4230f6f73b7fe4a0b03156f5
BLAKE2b-256 a6a6ed23cfdd2620b4d333b9ceb9cf11f7d9dc56297b8c3cebb2cec406033238

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.2.3-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.7

File hashes

Hashes for vector_ta-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5e6b776073a00d6847200031dec4eb67d00010c9d46eebf18728067557f5d67f
MD5 d6db25f8533684bdfbf147d8bff2b58b
BLAKE2b-256 39f93645833e11fd7a33723add0337079458440727e1bf6e9ddc605336e3e96b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 36f6f45955c3ab988a6c085437b4970b469e87f99d4d4a6f053194256c50ff9d
MD5 7953823044ee83f9971a32908c505297
BLAKE2b-256 aa8b42dc74458e9713694594bf32f521f7b2cd7a2d960235613d86b4a93dd900

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 899afe408956ea54795ba847dba1b42b33b21435a0ec7c690fd193968f7f2178
MD5 244c915777d14a5c15cc2653081f0f74
BLAKE2b-256 31ef864fd6e2b9c12b981db9718e1e19fecd8652f032d09940e254816a110a8f

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