Skip to main content

Quant Research Tools

Project description

Quant Research Tools (qrt)

QRT is an umbrella library of quantitative research tools

Install:

uv add qrt

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.tearsheet.report(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)
  • Tearsheets — performance reports for return streams: Sharpe/Sortino/Calmar, drawdowns, rolling stats, monthly heatmaps, benchmark comparison (q.tearsheet)
  • 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
matplotlib plotting in tearsheets and reports docs

Project layout

qrt/
├── qrt/
│   ├── models/      # pytorch wrappers
│   ├── splits/      # CV, embargo, purging
│   ├── tearsheet/   # performance reports
│   ├── portfolio/   # portfolio analysis
│   ├── bt/          # backtesting engine
│   ├── feat/        # feature engineering
│   └── data/        # DuckDB securities-master access
├── tests/
├── examples/        # notebooks
└── pyproject.toml

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

pyqrt-0.0.3.tar.gz (171.0 kB view details)

Uploaded Source

Built Distribution

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

pyqrt-0.0.3-py3-none-any.whl (73.0 kB view details)

Uploaded Python 3

File details

Details for the file pyqrt-0.0.3.tar.gz.

File metadata

  • Download URL: pyqrt-0.0.3.tar.gz
  • Upload date:
  • Size: 171.0 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

Hashes for pyqrt-0.0.3.tar.gz
Algorithm Hash digest
SHA256 535feb57864b37ee9dbfa87c2b206388851f77a8eaa508b4006c347aff6ba748
MD5 8161f282bfe8c916456e1622079d08ff
BLAKE2b-256 514555041cc7b561c6b5e7d23a86b5e3e42cc98e165108bc750c1b99842b094a

See more details on using hashes here.

File details

Details for the file pyqrt-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyqrt-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 73.0 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

Hashes for pyqrt-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b1e17992e4cf938fccc39c74c349919002669d3965d1daa99f3e9b0a2e6cac6
MD5 24d7f2213a175644fa1b696eb0e914c9
BLAKE2b-256 c6a21f7859d52d851b6073cf721a27a441778b7677e8ab5ae33020bda396f9ea

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