A fast algo-trading platform with support for machine learning based strategies
Project description
Roboquant is an open-source algorithmic trading platform. It is flexible, user-friendly and completely free to use. It is designed for anyone serious about algo-trading.
So whether you are a beginning retail trader or an established trading firm, roboquant can help you to develop robust and fully automated trading strategies. You can find out more at roboquant.org.
Usage
The following code snippet shows the steps required to run a full back-test on a number of stocks.
import roboquant as rq
feed = rq.feeds.YahooFeed("JPM", "IBM", "F", start_date="2000-01-01")
strategy = rq.strategies.EMACrossover()
account = rq.run(feed, strategy)
print(account)
Install
Roboquant can be installed like most other Python packages, using pip or conda. Make sure you have Python version 3.11 or higher installed.
python3 -m pip install --upgrade roboquant
If you don't want to install anything locally, you can try out roboquant in an online Jupyter environment like or .
The core of roboquant limits the number of dependencies. But you can install roboquant including one or more of the optional dependencies if you require certain functionality:
# market data from Yahoo Finance using the YahooFeed
python3 -m pip install --upgrade "roboquant[yahoo]"
# PyTorch based strategies using RNNStrategy
python3 -m pip install --upgrade "roboquant[torch]"
# Integration with Interactive Brokers using IBKRBroker
python3 -m pip install --upgrade "roboquant[ibkr]"
# Install all dependencies
python3 -m pip install --upgrade "roboquant[all]"
Building from source
Although this first step isn't required, it is recommended to create a virtual environment. Go to the directory where you have downloaded the source code and run the following commands:
python3 -m venv .venv
source .venv/bin/activate
You should now be in the virtual environment and ready to install the required packages and build/install roboquant:
pip install -r requirements.txt
python -m build
pip install .
Some other useful commands:
# run the unit tests
python -m unittest discover -s tests/unit
# validate the code
flake8 roboquant tests
License
Roboquant is made available under the Apache 2.0 license. You can read more about the Apache 2.0 license on this page: https://www.apache.org/licenses/LICENSE-2.0.html
Disclaimer
Absolutely no warranty is implied with this product. Use at your own risk. I provide no guarantee that it will be profitable, or that it won't lose all your money very quickly or does not contain bugs.
All financial trading offers the possibility of loss. Leveraged trading, may result in you losing all your money, and still owing more. Back tested results are no guarantee of future performance. I can take no responsibility for any losses caused by live trading using roboquant. Use at your own risk. I am not registered or authorised by any financial regulator.
Kotlin version
Next to this Python version of roboquant
, there is also a Kotlin version available. Both share a similar API, just the used computer language is different.
Which one to use depends very much on personal preferences, skills and usage.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file roboquant-0.9.3.tar.gz
.
File metadata
- Download URL: roboquant-0.9.3.tar.gz
- Upload date:
- Size: 56.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9826f54ea08db612b9c64e3fd37fc268188ba707a4ccfcf50e5df813c3a8c3b6 |
|
MD5 | c5b63d2f21f1e5597e8008995693f0bc |
|
BLAKE2b-256 | ea36394aa00a2d961a5dd7d19dd905fee850fb88f329cb61e7ab33d244aae30a |
File details
Details for the file roboquant-0.9.3-py3-none-any.whl
.
File metadata
- Download URL: roboquant-0.9.3-py3-none-any.whl
- Upload date:
- Size: 70.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1124a93ff74693f03fa726bbf3117cc61419878810bc893d0fc4639c846a5ccb |
|
MD5 | 84a2d6a8a5a5fca7e7f71ded1a375ad4 |
|
BLAKE2b-256 | 2640d3827c5ba860d48dd7653e682bd90cc9a611f67af669fe2e0f6b76c0eb4a |