Skip to main content

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

Project description

vector-ta

VectorTA is a Rust crate of technical analysis indicators focused on speed and predictable allocations, with optional SIMD/CUDA acceleration and optional Python/WASM bindings.

Full documentation (indicator list, API reference, and guides): https://vectoralpha.dev/projects/ta

The CUDA bindings are predominantly only worth using if used in a VRAM-resident workflow. For example, I can achieve a benchmark timing of 6.08 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 Tauri backtest optimization demo application using this library can achieve 58300 backtests for a double ALMA crossover strategy over 200k data points in only 158.71 milliseconds on the same hardware (RTX 4090 + AMD 9950X).

Rust usage

Example: ADX over 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 (compute_89) shipped in the crate.
  • cuda-build-ptx: You can compile PTX from kernels/cuda/** using nvcc.
  • nightly-avx: Runtime-selected AVX2/AVX512 kernels on x86_64 (nightly required).
  • python: PyO3 bindings (build from source via maturin).
  • wasm: wasm-bindgen bindings (build from source via wasm-pack).

Python (optional)

Build + 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

Publishing (PyPI)

Python wheels are published by GitHub Actions on version tags:

  • Add a repo secret PYPI_API_TOKEN (PyPI API token with upload permissions).
  • Bump Cargo.toml to the desired version.
  • Push a matching tag like v0.1.2 (tags containing - are treated as pre-releases and won't publish).

WASM (optional)

Build with wasm-pack:

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

CUDA (optional)

Enable:

[dependencies]
vector-ta = { version = "0.1.2", 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.1.2.tar.gz (5.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.1.2-cp313-cp313-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.13Windows x86-64

vector_ta-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

vector_ta-0.1.2-cp313-cp313-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vector_ta-0.1.2-cp312-cp312-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.12Windows x86-64

vector_ta-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

vector_ta-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vector_ta-0.1.2-cp311-cp311-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11Windows x86-64

vector_ta-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

vector_ta-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vector_ta-0.1.2-cp310-cp310-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.10Windows x86-64

vector_ta-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

vector_ta-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: vector_ta-0.1.2.tar.gz
  • Upload date:
  • Size: 5.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.1.2.tar.gz
Algorithm Hash digest
SHA256 914a150cc63daafca75c1dd4ce84073a16f0b394c860fb20bd0f5963827e5ad2
MD5 cf44df7d79efe97b72c7039c0ab4bad9
BLAKE2b-256 6c4b8673fe1c9ba9317e5e5585fce9b8f60b094d2d88a46d4555da31b3abc126

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.1.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.8 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.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3b78d148ab6f3aaf988ec34c17661f80317f9e86addb8c55ad52e2f3bedce92c
MD5 e8bab2b5ffb3dddc214d95a8ddef849c
BLAKE2b-256 a5c66dd622244b35468675685573fedb33cf481427ceb4462c5b1a4d341aefe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef3236c0be71d698c79ab427d811c041c307c1f095b520f7347373b4ab9c932c
MD5 12a26f95860bd2b7a3f4f22a73f7e399
BLAKE2b-256 13369a13d78546b0c8350c91621e1d869f88217b8cf8ecffed13438674f37fc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7770e362201597819f41145dcd0c55de86df8edb639d1ba355785575b4cb3f9b
MD5 84b13130dd0cc0a46bbe34b3d7857774
BLAKE2b-256 5b71491a25faa6407cf5d28f8ef0e5c6ad69c52a0d12973dd74d2c46425b60ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.8 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.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 33df4eb2ff657351113cbffed59e92cbea9b286bea0a6739550078788ec96f33
MD5 de78637c3ed2d8121a49c51d1af9ddc2
BLAKE2b-256 da70b24b24376088669c148ba98ce21f6fc4ade369bc629cfe4589f3eb657c2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 afdbbb656eae892d26f02495f8ba3815fddd8abf98392f94852bb25538023530
MD5 21dda218cc5c50ddaf3744357e4fd827
BLAKE2b-256 164705cf2544e2c3c4a4d48b52c00f8bca93b5318e97ad3a1f742865416b0495

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5e20a518780a72fdc126464bab983291fe6e924050acf13336972771a41678f
MD5 8231d535aedb03525a94d1bb4139060d
BLAKE2b-256 05b8793b3e67a4db9278912f2dac23cf1d1c4220ca1c7f0380fec40acf76cfe2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.8 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.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 79ed73beb632bb2f943ef949c619682c5eec1646de9193fed6e71538716fef41
MD5 73996d7a998755e5509ee99d065322cd
BLAKE2b-256 1801eea1391c1ef0f83c1433d8440edab9d291a1d8b3a0faa2cb91da6a9182a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73df7eddf1655f2898eb65fb949752b4e78407bfa078447aba23f66a7c0b56e8
MD5 3b5c2a2b0eb5462d1ccf7ba1fe39d87e
BLAKE2b-256 dddfdbdc3cd149fe10f23d41344b5b34cd3abc9b6635d93515f913e8fc1ba7bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9aca22fab3d3fffdea9a2c7e5e6dc30e8805b85e9cf68b5a4da250ac3421ca67
MD5 708db41c0c36a99f96f02a0cca921bad
BLAKE2b-256 0f3264a2b598f5b4cfb6664d01a0fd74b3c17b2cb5f288c4599f4e509a8b057f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vector_ta-0.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.8 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.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f87e2b70b8a8ce4dd05bb5ac492ba56e7c393cd6b4c8911c7732d30968cfa23c
MD5 a2e4ae8646e2807c9d4e25e2a0962b60
BLAKE2b-256 9b17bbf856d0f698502c42cfeb9675ab54e10af6c149d3909d01a9fbc4b6d8b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d667ddd30a9b9fff98197975e67bb19c707616aa42f0bdddf413dbedd9579203
MD5 30c4e4df2daebfc5fd883946e42e014b
BLAKE2b-256 50bd2dfec7e95c6d945722a60ecfbbe97018c509cc2310adb5cd490285b0c074

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vector_ta-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8a16bcd3e45a8f5dfd106bc74ff3c70b93264253d2b668293f8ce4450254123
MD5 c1d6951a55fe6e51ab9640488c006196
BLAKE2b-256 f554cdf8c3390d767d0658a063ce9f787918c3f8b0853a1d3654b19c7b88d8f7

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