Quantcentral.ai public Python SDK — strategy engine, indicators, stats, pairs, market calendars
Project description
quantcentral-sdk-python
Quantcentral.ai public Python SDK — strategy engine, 30+ indicators, stats, pairs analysis, market calendars.
Part of the Quantcentral.ai ecosystem.
Status
v0.1.0 — initial extraction from the QuantStack monorepo. The public surface is stable for the listed modules; the cloud platform (orchestration, runners, AI agents, risk engine, marketplace) is not part of this package and remains proprietary.
Install
pip install quantcentral-sdk
Requires Python 3.12+.
Quickstart
from quantcentral import StrategyBase, indicators
from quantcentral.strategy import Param
class SmaCross(StrategyBase):
fast = Param(10, type=int, min=2, max=200, label="Fast SMA")
slow = Param(50, type=int, min=2, max=400, label="Slow SMA")
def initialize(self):
self.closes: list[float] = []
def on_bar(self, bar):
self.closes.append(bar.close)
if len(self.closes) < self.slow:
return
fast_sma = indicators.sma(self.closes, self.fast)
slow_sma = indicators.sma(self.closes, self.slow)
if fast_sma > slow_sma and not self.get_position(bar.symbol).qty:
self.buy(bar.symbol, qty=100)
elif fast_sma < slow_sma:
self.close_position(bar.symbol)
The strategy runs unchanged in any Quantcentral runner (local, cloud, replay). Hosting the runner / data feed is out of scope for this SDK — you provide bars, the strategy reacts.
Modules
| Module | Purpose |
|---|---|
quantcentral.strategy |
StrategyBase lifecycle (initialize, on_bar, on_tick), Param / @input parameter descriptors. |
quantcentral.indicators |
30+ pure-Python indicators: sma, ema, rsi, macd, bollinger_bands, atr, adx, vwap, crossover, … |
quantcentral.stats |
mean, stdev, correlation, linear_regression, rolling_mean, z_score, max_drawdown, … |
quantcentral.pairs |
Cointegration helpers: compute_hedge_ratio, compute_zscore, half_life, is_cointegrated. |
quantcentral.contracts |
msgspec / pydantic schemas for Bar, Quote, Order, Fill, Position, RunSpec, … |
quantcentral.calendar |
Market calendars for NYSE, NASDAQ, TSX, LSE, JPX, ASX (via exchange_calendars) plus FOREX (24/5) and CRYPTO (24/7). |
License
Apache-2.0 — see LICENSE for details. Attribution requirements in NOTICE.
Development
git clone git@github.com:QuantCentral-ai/quantcentral-sdk-python.git
cd quantcentral-sdk-python
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
pytest
Tracking: https://github.com/QuantCentral-ai/quantcentral-planning
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantcentral_sdk-0.1.0.tar.gz.
File metadata
- Download URL: quantcentral_sdk-0.1.0.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e574594093c9aba87fdeb9554bff54179763a9ff1c263b7956fe7910524003e
|
|
| MD5 |
361973c394f942ffd43961d655aa7f05
|
|
| BLAKE2b-256 |
573eeafc3633e9bb49a6fcf17ed5f09e26d1a6d9de639d88a9e7e16f0ef6a903
|
Provenance
The following attestation bundles were made for quantcentral_sdk-0.1.0.tar.gz:
Publisher:
release.yml on QuantCentral-ai/quantcentral-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantcentral_sdk-0.1.0.tar.gz -
Subject digest:
3e574594093c9aba87fdeb9554bff54179763a9ff1c263b7956fe7910524003e - Sigstore transparency entry: 1472011357
- Sigstore integration time:
-
Permalink:
QuantCentral-ai/quantcentral-sdk-python@98c3f99abe70af60640d3d021960ad72f84ad902 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/QuantCentral-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c3f99abe70af60640d3d021960ad72f84ad902 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quantcentral_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quantcentral_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12504124e8b110f5d6a103416dc084ee1588933e2f1a48159212c3323b34939a
|
|
| MD5 |
c5c3f5d3ba25c26f3d8d9e926e0e48a1
|
|
| BLAKE2b-256 |
5d0242a45a778ebad50a61a265eba9f0d9a96c7b4c271c4a3b71e6ea32dd39ea
|
Provenance
The following attestation bundles were made for quantcentral_sdk-0.1.0-py3-none-any.whl:
Publisher:
release.yml on QuantCentral-ai/quantcentral-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantcentral_sdk-0.1.0-py3-none-any.whl -
Subject digest:
12504124e8b110f5d6a103416dc084ee1588933e2f1a48159212c3323b34939a - Sigstore transparency entry: 1472011443
- Sigstore integration time:
-
Permalink:
QuantCentral-ai/quantcentral-sdk-python@98c3f99abe70af60640d3d021960ad72f84ad902 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/QuantCentral-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98c3f99abe70af60640d3d021960ad72f84ad902 -
Trigger Event:
push
-
Statement type: