Skip to main content

📊 The Quant SDK for Python and Javascript. Written in Rust.

Project description

qPACE banner

qPACE

The Quant SDK for Python · JavaScript · Rust

From research to production - all in one toolkit.

PyPI NPM Discord

qPACE: The all-in-one quantitative toolkit powered by Rust - usable from Python, Node.js, and the browser.

  • Cross‑language, cross‑platform - high‑performance Rust core with the fully typed API for Python, Node.js (NAPI), and Browser (WebAssembly).

  • Extremely fast backtesting engine - millions of bars per second. Export exact trades back to Pine for one‑click visual validation.

  • Technical Analysis - more than 30 indicators fully compliant with TradingView results, written in Pine and compiled using our compiler.

  • Data layer - resampling/aggregation, zipping/unzipping, reading/writing from CSV/Parquet, and more.

  • Cross-ecosystem - interoperable with Pandas, Polars, and more.

  • CLI + upcoming UI

Quick Links

Installation

Python

pip install qpace

JavaScript

npm install qpace

Quick Example

Python

import qpace as qp

ohlcv = qp.Ohlcv.read_csv("btc.csv")
ctx = qp.Ctx(ohlcv, qp.Sym.BTC_USD())
rsi = qp.ta.rsi(ctx.copy(), ohlcv.close, 14)

Node.js

import * as qp from "qpace/node";

const ohlcv = qp.Ohlcv.readCsv("btc.csv");
const ctx = new qp.Ctx(ohlcv, qp.Sym.BTC_USD());
const rsi = qp.ta.rsi(ctx.copy(), ohlcv.close, 14);

Pine from Python/JavaScript

We designed and developed in-house Pine Script compiler that takes your original Pine Script code and compiles it to efficient rust code that is later exposed to Python, Node.js and Web/WASM with type hints. Easy interface and practically no hustle from your side. Our compiler supports any technical analysis indicator and strategy, while having extreme performance.

  • bot automation
  • machine learning
  • backtesting
  • parameter optimization
  • and much more

Get started

Compiler gif

script.pine

//@version=5
library("MyLibrary")

export custom_ma(series float src, int length) =>
    ta.ema(ta.change(src) * volume, length)

Python:

import qpace as qp
import my_library as pine

ctx = qp.Ctx(ohlcv, qp.Sym.BTC_USD())
custom_ma = pine.script.custom_ma(ctx.copy(), ohlcv.close, 14)
print(custom_ma) # [1.0, 2.0, ...]

Node.js:

import * as qp from "qpace/node";
import * as pine from "my_library"; 

const ctx = new qp.Ctx(ohlcv, qp.Sym.BTC_USD());
const customMa = pine.script.custom_ma(ctx.copy(), ohlcv.close, 14);
console.log(customMa); // [1.0, 2.0, ...]

Suite

qPACE Suite: Free collection of the best indicators and strategies (separate package to qpace).

Python:

pip install qpace_suite

JavaScript:

npm install @qpace/suite

Jdehorty

AlgoAlpha

TA

Built-in TA functions.

import qpace as qp
rsi = qp.ta.rsi(ctx.copy(), src=ohlcv.close, length=14)
import * as qp from "qpace/node";
const rsi = qp.ta.rsi(ctx.copy(), ohlcv.close, 14);

Roadmap

Every TA indicator was compiled using Pine to Python/JavaScript compiler.

Momentum (17)

  • Awesome Oscillator AO
  • Absolute Price Oscillator APO
  • Balance of Power BOP
  • Commodity Channel Index CCI
  • Coppock Curve
  • KST Oscillator KST
  • Moving Average Convergence Divergence MACD
  • Momentum MOM
  • Price Oscillator PO
  • Rate of Change ROC
  • Relative Strength Index RSI
  • Relative Vigor Index RVGI
  • Stochastic RSI STOCHRSI
  • Trix TRIX
  • True Strength Index TSI
  • Ultimate Oscillator UO
  • Williams %R W%R

Overlap (11)

  • Double Exponential MA DEMA
  • Exponential MA EMA
  • Fibonacci Weighted MA FMWA
  • Hull MA HMA
  • Linear Weighted MA LWMA
  • Relative MA RMA
  • Simple MA SMA
  • Symmetrically Weighted MA SWMA
  • Triple Exponential MA TEMA
  • Volume-Weighted MA VWMA
  • Weighted MA WMA

Trend (8)

  • Advance/Decline Ratio ADR
  • Aroon AROON
  • Bull/Bear Power BBP
  • Chande-Kroll Stop CKS
  • Choppiness Index CHOP
  • Detrended Price Oscillator DPO
  • Supertrend ST
  • Vortex Indicator VI

Volatility (7)

  • Average True Range ATR
  • Bollinger Bands BB
  • Bollinger %B %B
  • Bollinger Width BBW
  • Donchian Channel DC
  • Relative Volatility Index RVI
  • True Range TR

Volume (6)

  • Accumulation/Distribution (Williams) ACCDIST
  • Chaikin Money Flow CMF
  • Elder’s Force Index EFI
  • Ease of Movement EOM
  • Money Flow Index MFI
  • Volume Oscillator VO

Statistics (1)

  • Standard Deviation STD

Utilities & Helpers (11)

  • Bars Since
  • Change
  • Cross
  • Cross-Over
  • Cross-Under
  • Cumulative Sum CUM
  • Highest
  • Highest Bars
  • Lowest
  • Lowest Bars
  • Rate of Change ROC

Community

Become a part of the qPACE community and connect with like-minded individuals who are passionate about trading, finance, and technology!

Join Discord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

qpace-0.2.6-py3-none-win_amd64.whl (5.3 MB view details)

Uploaded Python 3Windows x86-64

qpace-0.2.6-py3-none-manylinux2014_x86_64.whl (7.3 MB view details)

Uploaded Python 3

qpace-0.2.6-py3-none-macosx_11_0_x86_64.whl (6.6 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

qpace-0.2.6-py3-none-macosx_11_0_arm64.whl (5.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file qpace-0.2.6-py3-none-win_amd64.whl.

File metadata

  • Download URL: qpace-0.2.6-py3-none-win_amd64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for qpace-0.2.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 00b9142cafa27541a4d252f224d3eac1fcdabccc4f99dfb786bd1c68c67bc976
MD5 2d8c1005e5c154ff8bf15f843eed8e07
BLAKE2b-256 0ee77ddf9095676e5545f0c2afee9c34116457fd7e13a6fdd5d43633f4f25667

See more details on using hashes here.

File details

Details for the file qpace-0.2.6-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qpace-0.2.6-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7531b31c5448acb79afb47b0d90dd986be2477eae371e8d749f6f2a96747a91c
MD5 0c308cafed8c3f524ca31de28c2900b5
BLAKE2b-256 a6d28f0f83b71054766a9e1cf52b1490cb8763b7a2fb0a44fed3b804a825e883

See more details on using hashes here.

File details

Details for the file qpace-0.2.6-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for qpace-0.2.6-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e8dab84d8e168ccd5cb089f961751dae7d271bdcc275c29116b5b28968bad969
MD5 b8ab4e02f8814557c39d0a835bb826ef
BLAKE2b-256 29e7ec3ed1d35158f575647f1c370a945ed9c83adc39b6d3dabd4364c6ec3979

See more details on using hashes here.

File details

Details for the file qpace-0.2.6-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: qpace-0.2.6-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for qpace-0.2.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d390485ddc924ccd2a2b321dc347d792188ca4431d1015b39f2675e2d39b9946
MD5 446980b5f7645ecd80c8b4d66c3faa5a
BLAKE2b-256 59c030cade95c71d703efbdff48b4b8df8b1c0ad6476060894c371ef6f7e7391

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