A Python library for backtesting trading strategies and applying reinforcement learning to trading.
Project description
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:
$ pip install qtrade-lib
Alternatively, you can obtain the latest source code from GitHub:
$ git clone https://github.com/gguan/qtrade.git
$ cd qtrade
$ pip install .
Run Example
To run the example code from repository:
$ pip install -r examples/requirements.txt
$ python examples/simple_strategy.py
Requirements
- Python >= 3.10
- Dependencies declared in
pyproject.toml
Development
$ pip install -e ".[dev]"
$ pre-commit install # auto-runs ruff + mypy on each commit
$ pytest # run the test suite
Usage
The User Guide is the place to learn how to use the library and accomplish common tasks. For more advanced customization, refer to the Customization Guide.
The Reference Documentation provides API-level documentation.
References
This project is inspired by following projects.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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 qtrade_lib-0.4.1.tar.gz.
File metadata
- Download URL: qtrade_lib-0.4.1.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c27d7c34e429ee218683bc8a4ad359856e51a86528f75f66b38ff85b02057e
|
|
| MD5 |
f605692937cb9d73839a2033761a83c8
|
|
| BLAKE2b-256 |
d42e5734ca46385f95fc76e7606bf0b2dd3ac58f17825816aeef8fc4e9c5d843
|
Provenance
The following attestation bundles were made for qtrade_lib-0.4.1.tar.gz:
Publisher:
release.yml on gguan/qtrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qtrade_lib-0.4.1.tar.gz -
Subject digest:
07c27d7c34e429ee218683bc8a4ad359856e51a86528f75f66b38ff85b02057e - Sigstore transparency entry: 1463039908
- Sigstore integration time:
-
Permalink:
gguan/qtrade@53774575ff541f943c366661e7aa35082021921e -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/gguan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@53774575ff541f943c366661e7aa35082021921e -
Trigger Event:
push
-
Statement type:
File details
Details for the file qtrade_lib-0.4.1-py3-none-any.whl.
File metadata
- Download URL: qtrade_lib-0.4.1-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7307951e00d6c3b912a567d90f974cfd8893f372d30275166541e78c0ffb3ad1
|
|
| MD5 |
92d94f5a1fd7919c237576be099d5e0f
|
|
| BLAKE2b-256 |
7952fd303be79dbd5052e1df52f43930e3859c02c10820894deac214d7f6d719
|
Provenance
The following attestation bundles were made for qtrade_lib-0.4.1-py3-none-any.whl:
Publisher:
release.yml on gguan/qtrade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qtrade_lib-0.4.1-py3-none-any.whl -
Subject digest:
7307951e00d6c3b912a567d90f974cfd8893f372d30275166541e78c0ffb3ad1 - Sigstore transparency entry: 1463039918
- Sigstore integration time:
-
Permalink:
gguan/qtrade@53774575ff541f943c366661e7aa35082021921e -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/gguan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@53774575ff541f943c366661e7aa35082021921e -
Trigger Event:
push
-
Statement type: