Skip to main content

Quant Research Tools

Project description

qrt — Quant Research Tools

One consistent import qrt as q API over the fragmented quant Python ecosystem — market data, technical indicators, return statistics, and interactive plotting, wired together so the output of one is the input of the next.

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.plot(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.feature.talib, q.feature.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 pandas DataFrame/Series OHLCV 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, and q.plot.trades/mae_mfe/ trade_distribution all 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.plot functions, 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.feature feature engineering: own indicators + TA-Lib + pandas-ta-classic
q.stats return-stream & trade-level statistics: performance, alpha/beta, Monte Carlo, variance/noise testing
q.plot interactive Plotly charts and performance reports, for both return streams and trade logs
q.model ML model utilities (PyTorch helpers via torchinfo)
q.model.selection leakage-aware CV splits (walk-forward, purged K-fold, embargo) (planned)
q.bt event-driven backtesting (planned)
q.portfolio portfolio 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/

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.16.tar.gz (16.4 MB 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.16-py3-none-any.whl (764.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyqrt-0.0.16.tar.gz
  • Upload date:
  • Size: 16.4 MB
  • 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.16.tar.gz
Algorithm Hash digest
SHA256 29dd83d0e3c3a923a4c203bbb32f22520cf47bf6abbac5f7fb61f47bfd34373c
MD5 f88a9d15245efae187edbcacfa6c663a
BLAKE2b-256 ae7d1cd9c10c20d8f867da1edcdc2cb07a8c129b4bc36c5d47843d15646bdcb3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqrt-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 764.7 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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 acb7d768bf81d8775676fd8c1603002adab24c32754bdceadccbef3cc166b21c
MD5 b1f4ccd1944977ede76beacacfc9689d
BLAKE2b-256 f08665b3d3de6be92336961df17c60b742f728305981f893dbdefa0047b48f2d

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