Metadata-Version: 2.4
Name: pyqrt
Version: 0.0.5
Summary: Quant Research Tools
Project-URL: documentation, https://quantbert.github.io/qrt/
Project-URL: repository, https://github.com/quantbert/qrt
Author: Iman Karimi
License: MIT License
        
        Copyright (c) 2026 QuantBert
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: duckdb>=1.5.4
Requires-Dist: ipykernel>=7.3.0
Requires-Dist: kaleido>=1.0
Requires-Dist: nbformat>=5.10
Requires-Dist: pandas-ta-classic>=0.6.52
Requires-Dist: pandas>=3.0
Requires-Dist: plotly>=6.0
Requires-Dist: pyarrow>=17.0
Requires-Dist: requests>=2.32
Requires-Dist: ta-lib>=0.7.0
Requires-Dist: torch>=2.13.0
Requires-Dist: tqdm>=4.68.4
Requires-Dist: yfinance>=1.5.1
Description-Content-Type: text/markdown

# Quant Research Tools (qrt)

QRT is an umbrella library of quantitative research tools

## Warning ⚠️

Library is still under early development. Come back later. 

## Install:
```bash
uv add pyqrt
```

## Use:
```python
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](https://github.com/pandas-dev/pandas) | DataFrames/Series as the common data format throughout | [docs](https://pandas.pydata.org/docs/) |
| [TA-Lib](https://github.com/ta-lib/ta-lib-python) | technical indicators, wrapped in `q.feat.talib` | [docs](https://ta-lib.github.io/ta-lib-python/) |
| [pandas-ta-classic](https://github.com/xgboosted/pandas-ta-classic) | technical indicators & candlestick patterns, wrapped in `q.feat.pandas_ta` | [docs](https://xgboosted.github.io/pandas-ta-classic/) |
| [PyTorch](https://github.com/pytorch/pytorch) | model training and inference (`q.models`) | [docs](https://docs.pytorch.org/docs/stable/) |
| [DuckDB](https://github.com/duckdb/duckdb) | In process database (`q.data`, `q.bt`) | [docs](https://duckdb.org/docs/) |
| [yfinance](https://github.com/ranaroussi/yfinance) | Yahoo Finance market data (`q.vendors`) | [docs](https://ranaroussi.github.io/yfinance/) |
| [Plotly](https://github.com/plotly/plotly.py) | interactive charts, tearsheets, and image export | [docs](https://plotly.com/python/) |


## 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
```