This new pythonnet package makes available the latest version from pythonnet master branch and includes modifications to enable charting in Lean for python. The dockerfile to create images for the cloud is updated to reflect the package update and adds keras and tensorflow
QuantConnect Python Algorithm Project:
To run algorithms in Lean your primary modules must be called "main.py".
Set your config "algorithm-language" property to "Python". Set your config "algorithm-location" property to "QuantConnect.Algorithm.Python.dll".
WINDOWS:
-
Install Iron Python: http://ironpython.codeplex.com/releases/view/169382
-
Add an entry to the system path variable (C:\Program Files (x86)\IronPython 2.7)
-
Run the build script (build.bat).
-
Optional: Right click on QuantConnect.Algorithm.Python project and click properties. On Build Events tab enter "build" in the post-build events.
LINUX: To use Lean-Python on linux you'll need to install IronPython as well as Python. This is based from this guide: http://ironpython.codeplex.com/wikipage?title=IronPython%20on%20Mono
-
Install Python(2.7): sudo apt-get install python-all zip git make
-
Install Iron Python 2.7.5:
-
Go to this website and downlaod to a local directory:
-
wget https://github.com/IronLanguages/main/releases/download/ipy-2.7.5/IronPython-2.7.5.zip
-
extract: to a base directory or your local bin. unzip IronPython-2.7.5.zip
-
Update the build.sh variable "pyc" to point towards your pyc.py file, it should be under ./IronPython-2.7.5/Tools/Scripts/pyc.py
-
-
Run the build.sh.