qrt — Quant Research Tools
One consistent import qrt as q API for the fragmented quantitative Python ecosystem.
qrt is a curated, batteries-included research toolkit for quantitative finance. It brings together market data, technical indicators, return and risk analytics, finance- and ML-aware visualizations, machine learning workflows, and generative AI tools under one coherent API.
Spend less time connecting libraries and more time researching, testing, and building quantitative strategies.
import qrt as q
aapl = q.data.sources.yfinance.read("AAPL", "2024-01-01", "2025-01-01", "1d")
spy = q.data.sources.yfinance.read("SPY", "2024-01-01", "2025-01-01", "1d")
strategy = aapl["close"].pct_change().rename("AAPL")
benchmark = spy["close"].pct_change().rename("SPY")
q.stats.benchmark_stats(strategy, benchmark) # alpha, beta, Sharpe, tracking error, ...
q.plot.performance(strategy, benchmark=benchmark) # interactive equity + drawdown report
Why qrt
- No more juggling five libraries with five conventions. TA-Lib and
pandas-ta-classic indicators (
q.indicator.talib,q.indicator.pandas_ta), Yahoo Finance/Binance/DuckDB market data (q.data.sources), and 30+ risk/return metrics inspired by quantstats (q.stats) all speak the same plain pandasDataFrame/SeriesOHLCV and return-stream layout — chain them freely, no glue code, no format conversion. - A canonical trades format, not just return streams. One row per
round-trip trade (entry/exit price & time, direction, MAE/MFE, free-form
feature snapshots) is a first-class citizen:
q.stats.trade_stats,q.stats.trades_to_returns, andq.plot.trades/mae_mfe/trade_distributionall consume it directly. - Built-in robustness checks, not just a backtest score. Bootstrap
Monte Carlo, forward win-rate variance testing, and noise-sensitivity
testing ship as first-class
q.stats/q.plotfunctions, not an afterthought — ask "does this edge survive a different order of draws / a worse win rate / noisier data?" in one call. - Interactive by default. Every chart is a real Plotly figure — zoom,
hover, range-select — exportable to standalone HTML or PNG with
q.plot.show. - Works offline. Bundled sample OHLCV data (AAPL, SPY, BTC-USD) and demo strategy trade logs mean you can try every function with zero network calls or API keys.
Library layout
| Module | Purpose |
|---|---|
q.data |
local parquet/csv I/O, market data sources (Yahoo Finance, Binance, DuckDB), bundled sample datasets |
q.env |
explicit .env loading and environment-variable access |
q.gym |
Gymnasium-compatible financial reinforcement-learning environments |
q.calendar |
exchange sessions, closures, and market-time semantics |
q.indicator |
native single-instrument measurements plus explicit TA-Lib and pandas-ta-classic providers |
q.cross_section |
cross-sectional ranks, neutralization, relative strength, grouped returns, and Elo |
q.label |
future-aware target construction, event filtering, and overlap-aware sample weights |
q.dataset |
aligned model inputs, targets, weights, metadata, and split schemes |
q.transform |
fitted model-input transformations (planned) |
q.signal |
point-in-time investment intent: thresholds, cross-sectional selection, delay, decay, holding, cooldown, combination, and target exposure |
q.stats |
return-stream, risk, and trade-level statistics: explicit historical/Gaussian tail estimators, performance, alpha/beta, and robustness tests |
q.plot |
interactive Plotly charts and performance reports, for both return streams and trade logs |
q.model |
sklearn-compatible position-array helpers and optional PyTorch utilities |
q.bt |
event-driven backtesting (planned) |
q.portfolio |
portfolio construction and analysis (planned) |
Warning ⚠️
Still in early alpha — APIs may change without notice. Track progress on the Roadmap.
Install
uv add pyqrt
Docs
Full documentation, tutorials, and API reference: https://quantbert.github.io/qrt/
Metadata
Release files for pyqrt 0.0.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyqrt-0.0.23.tar.gz | 41.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyqrt-0.0.23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.3 MB
Release files / pyqrt-0.0.23.tar.gz
| Download URL | pyqrt-0.0.23.tar.gz |
|---|---|
| Size | 41.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6c5fb3be44a04eab02691cbb5e37bb4fa11a904345d3dcc63c800987f57ca8d
|
|
BLAKE2b-256 checksum How to use checksums |
6b689b5da31dac90a2d6fb3253e4b5508288428066399f62219beb61b0017db3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pyqrt-0.0.23-py3-none-any.whl
| Download URL | pyqrt-0.0.23-py3-none-any.whl |
|---|---|
| Size | 889.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af7f5a5f95054273e74f589642d63acf4651123975c364967a52f1f4639467d6
|
|
BLAKE2b-256 checksum How to use checksums |
abdb9544091760c92c6901ca3de1ece04b1e654073e65db88cb0b2b970d20bf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pyqrt 0.0.23
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.