quanttrader backtest and live trading library
Project description
quanttrader
Backtest and live trading in 100% pure Python, open sourced on GitHub.
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.
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
Hashes for quanttrader-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc37b1c6b9a2e9b54d867aee9c6a2d87743e5eeaea6aa911ebf362bbb6ffaec |
|
MD5 | 2305e5ccdc4b2daed3a6a418de138b2b |
|
BLAKE2b-256 | 6f2b8637de290848737e3fc3a2b8c27f9d709c8e9d52c38c33a2c8044b89c031 |