Quant Research Tools
Project description
Quant Research Tools (qrt)
QRT is an umbrella library of quantitative research tools
Warning ⚠️
Library is still under early development. Come back later.
Install:
uv add pyqrt
Use:
import qrt as q
# leakage-safe splits
splits = q.splits.walk_forward(X, n_splits=5, embargo="5D")
# features
X["sma_20"] = q.feat.qta.sma(prices, 20)
# backtest + tearsheet
result = q.bt.run(signal, prices)
q.plot.tearsheet(result.returns, benchmark="SPY")
Features (planned / in progress)
- Model wrappers — thin, opinionated wrappers around PyTorch models for training, checkpointing and inference on financial time series (
q.models) - Data splitting — leakage-aware splits: walk-forward, purged K-fold and combinatorial purged CV with embargo (à la López de Prado) (
q.splits) - Plotting & tearsheets — interactive Plotly reports for return streams: Sharpe/Sortino/Calmar, drawdowns, rolling stats, monthly heatmaps, benchmark comparison (
q.plot) - Portfolio analysis — attribution, exposure, turnover and risk decomposition (
q.portfolio) - Backtesting — event-driven backtesting of model signals, connected to the master securities database (DuckDB) (
q.bt) - Feature engineering — feature submodules under one namespace: hand-rolled primitives (
q.feat.qta.sma(),q.feat.qta.lags()), all TA-Lib indicators (q.feat.talib.RSI(ohlc)) and all pandas-ta-classic indicators (q.feat.pandas_ta.bbands(ohlc)) with a pandas-friendly interface (q.feat)
Libraries used
Notable libraries qrt is built on and/or wraps:
| Library | Used for | Docs |
|---|---|---|
| pandas | DataFrames/Series as the common data format throughout | docs |
| TA-Lib | technical indicators, wrapped in q.feat.talib |
docs |
| pandas-ta-classic | technical indicators & candlestick patterns, wrapped in q.feat.pandas_ta |
docs |
| PyTorch | model training and inference (q.models) |
docs |
| DuckDB | In process database (q.data, q.bt) |
docs |
| yfinance | Yahoo Finance market data (q.vendors) |
docs |
| Plotly | interactive charts, tearsheets, and image export | docs |
Project layout
qrt/
├── qrt/
│ ├── models/ # pytorch wrappers
│ ├── splits/ # CV, embargo, purging
│ ├── plot/ # plotting + performance reports
│ ├── portfolio/ # portfolio analysis
│ ├── bt/ # backtesting engine
│ ├── feat/ # feature engineering
│ └── data/ # DuckDB securities-master access
├── tests/
├── examples/ # notebooks
└── pyproject.toml
Docs
Docs are built with Quarto + quartodoc (API reference from docstrings). Quarto's CLI is a separate system install (not a Python package) — see quarto.org/docs/get-started. Once installed:
make docs # build API reference + serve the docs locally
make docs-deploy # build + publish to GitHub Pages
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 pyqrt-0.0.6.tar.gz.
File metadata
- Download URL: pyqrt-0.0.6.tar.gz
- Upload date:
- Size: 354.2 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee7ba2b0b02e257db567a1bd9a60cdb6364f14ef0d6ede61e01cd483fe4f82d5
|
|
| MD5 |
8474dd818e4d988630c3b35d1e02f996
|
|
| BLAKE2b-256 |
d7d71e7647bce7d8475f316c92ca7885060b621398f965a70280bc5b03f0074e
|
File details
Details for the file pyqrt-0.0.6-py3-none-any.whl.
File metadata
- Download URL: pyqrt-0.0.6-py3-none-any.whl
- Upload date:
- Size: 82.2 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e20ece1e7e36a65ddb163d8bcad422b41b684f93d38bd503ebc39e9cd1553a
|
|
| MD5 |
902213863429db9d86f5f94ab61bbe28
|
|
| BLAKE2b-256 |
4ce1870798de83380cd071e4ad2154f6072a3c173d36c7e006b0a1b739de1abb
|