quanttrader
Welcome to quanttrader, a pure python-based event-driven backtest and live trading package for quant traders.
The source code is completely open-sourced here on GitHub. The package is published here on pypi and is ready to be pip installed. The document is hosted here on readthedocs.
In most cases, a backtest strategy can be directly used for live trade by simply switching to live brokerage. A control window is provided to monitor live trading sessions for each strategy separately and the portfolio as a whole.
Backtest
Live trading
Prerequisite: download and install IB TWS or IB Gateway; enable API connection as described here.
Installation
Step 1
pip install quanttrader
Alternatively, download or git the source code and include unzipped path in PYTHONPATH environment variable.
step 2
Download live_engine.py, config_live.yaml, order_per_interval_strategy.py by clicking Raw button, right clicking save as, and then change the file extension to .py or .yaml.
step 3
cd where_the_files_are_saved
python live_engine.py
Instruments Supported and Example
- Stock: AMZN STK SMART
- Foreign Exchange: EURGBP CASH IDEALPRO
- Futures: ESM9 FUT GLOBEX
- Options on Stock: AAPL OPT 20201016 128.75 C SMART
- Options on Futures: ES FOP 20200911 3450 C 50 GLOBEX
- Comdty: XAUUSD CMDTY SMART
Order Type Supported
Basic order types. See IB Doc for details.
- Auction
- Auction Limit
- Market
- Market If Touched
- Market On Close
- Market On Open
- Market to Limit
- Limit Order
- Limit if Touched
- Limit on Close
- Limit on Open
- Stop
- Stop Limit
- Trailing Stop
- Trailing Stop Limit
DISCLAIMER Open source, free to use, free to contribute, use at own risk. No promise of future profits nor responsibility of future loses.
Metadata
Release files for quanttrader 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| quanttrader-0.5.5.tar.gz | 69.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quanttrader-0.5.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.3 kB
Release files / quanttrader-0.5.5.tar.gz
| Download URL | quanttrader-0.5.5.tar.gz |
|---|---|
| Size | 69.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40b9114e1bc89ae2ecb515230ee50f47713cea0d298dbf695b8caf908b665e34
|
|
BLAKE2b-256 checksum How to use checksums |
3b3011ad492bece11c364c20169584da2af68a9c9a21197ab9aee52e27c11bf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / quanttrader-0.5.5-py3-none-any.whl
| Download URL | quanttrader-0.5.5-py3-none-any.whl |
|---|---|
| Size | 101.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5484fddd3da8b20485790513e4e24a333a5ef715960c8fb46a66cf169fdfb30f
|
|
BLAKE2b-256 checksum How to use checksums |
966e57c6425f928d8d11f3790088331ad905ff64f4cae0dd3af878a852ac96f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Security for quanttrader 0.5.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.