Metadata-Version: 2.4
Name: qtrade-lib
Version: 0.4.1
Summary: A Python library for backtesting trading strategies and applying reinforcement learning to trading.
Project-URL: Homepage, https://github.com/gguan/qtrade
Project-URL: Repository, https://github.com/gguan/qtrade
Author-email: Guan Guan <guanguan1114@gmail.com>
License: MIT
License-File: LICENSE
Keywords: backtesting,reinforcement learning,trading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Requires-Dist: bokeh>=3.9
Requires-Dist: gymnasium>=1.0
Requires-Dist: matplotlib>=3.9
Requires-Dist: mplfinance>=0.12.10b0
Requires-Dist: numpy>=2.0
Requires-Dist: pandas>=2.2
Requires-Dist: scipy>=1.13
Requires-Dist: tqdm>=4.66
Provides-Extra: dev
Requires-Dist: coverage>=7.0.0; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-benchmark>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: rl
Requires-Dist: stable-baselines3>=2.0; extra == 'rl'
Description-Content-Type: text/markdown

[![CI Status](https://github.com/gguan/qtrade/actions/workflows/ci.yml/badge.svg)](https://github.com/gguan/qtrade/actions)
[![Python](https://img.shields.io/pypi/pyversions/qtrade-lib.svg)](https://badge.fury.io/py/qtrade-lib)
[![PyPI version](https://badge.fury.io/py/qtrade-lib.svg)](https://badge.fury.io/py/qtrade-lib)
![Coverage](https://img.shields.io/badge/coverage-87%25-green)
[![codestyle](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# QTrade

QTrade is a simple, modular, and highly customizable trading interface capable of handling backtesting, reinforcement learning tasks.

## Features

- Backtesting engine
- Gym Trading environment simulation

## Installation

QTrade can be installed with [pip](https://pip.pypa.io):

```bash
$ pip install qtrade-lib
```

Alternatively, you can obtain the latest source code from [GitHub](https://github.com/gguan/qtrade):

```bash
$ git clone https://github.com/gguan/qtrade.git
$ cd qtrade
$ pip install .
```

### Run Example

To run the example code from repository:

```bash
$ pip install -r examples/requirements.txt
$ python examples/simple_strategy.py
```

### Requirements

- Python >= 3.10
- Dependencies declared in `pyproject.toml`

### Development

```bash
$ pip install -e ".[dev]"
$ pre-commit install   # auto-runs ruff + mypy on each commit
$ pytest               # run the test suite
```


### Usage

The [User Guide](guide/getting_started.md) is the place to learn how to use the library and accomplish common tasks. For more advanced customization, refer to the [Customization Guide](customisation/index.md).

The [Reference Documentation](reference/index.md) provides API-level documentation.


## References

This project is inspired by following projects.

- https://github.com/tensortrade-org/tensortrade
- https://github.com/kernc/backtesting.py


## License

This project is licensed under the MIT License - see the LICENSE file for details.