Wizardry is an open-source CLI built on the top of lean cli for building powerful algorithmic trading strategies faster and easier (for Lean/QuantConnect)
pip install wizardry
There are 6 commands in Wizardry CLI:
-
wizardry create ProjectName
create a project on which you can work on. You should alway start with this command when creating a new algorithm. -
wizardry framework
enables user to define an alpha, a universe, a portfolio construction and a risk managment model to build the body of your strategy -
wizardry library
enables user to explore and "fork" to their local machine about 100 algo trading strategies from this webpage -
wizardry backtest
backtest your trading strategy on QuantConnect's cloud -
wizardry live
deploy your algorithm in live with QuantConnect -
wizardry live
optimize your strategy with QuantConnect
This command allow you to create a project folder:
βββ ProjectName
β βββ .idea
β β βββ misc.xml
β β βββ modules.xml
β β βββ ProjectName.iml
β β βββ workspace.xml
β β
β βββ .vscode
β β βββ launch.json
| | βββ settings.json
| |
β βββ config.json
β βββ main.py (where your algo is)
β βββ research.ipynb
Once you created the project, in order to work on it with wizardry, you'll need to go your project directory
cd ProjectName
Note: For every other commands, you'll need to be in your project directory in order to make it work.
It follows the same process than Quantconnect (+few extra features) :
- π Universe Selection : Select your assets
- π Alpha Creation : Generate trading signals
- π Portfolio Construction : Determine position size targets
- π Execution : Place trades to reach your position sizes
- π Risk Management : Manage the market risks
Run wizardry backtest
in your project directory
What it will do:
- Push the local changes to the cloud
- Backtest in the cloud (with QuantConnect's data)
- Show you the result in your terminal
- Open a page with the backtesting's results
Run wizardry optimize
in your project directory
It will push the modifications to the cloud and offer different options in order to optimize your strategy.
Based on QuantConnect's lean cloud optimize
command, check what it can do here
Run wizardry live
in your project directory
It will push the modifications to the cloud and deploy your strategy live.
Based on QuantConnect's lean cloud live
command, check what it can do here
Please submit bugs and feature requests as an issue. Before submitting an issue please read others to ensure it is not a duplicate.
Contributions are warmly very welcomed but we ask you to read the existing code to see how it is formatted, commented and ensure contributions match the existing style. All code submissions must include accompanying tests. Please see the contributor guide lines.