Back

[Update] Python Library Support

We're happy to share that python libraries are now fully supported in QuantConnect. We've completely re-engineered the python stack to use PythonNet which acts as a bridge between Python and .NET enabling use of all your favorite libraries!

The vast majority of the API remains identical but there will be some gotcha's. If you find your python algorithm aren't working anymore you will need to do a little conversion work to get them into the new system. There are 30 examples of the new python net framework in github you can use as a reference.

We've been testing for about 6 months but there will likely be issues in the integration. If you find an issue please let us know through support: support@quantconnect.com 

Thanks Alex and Stefano for all their work!

 

Update Backtest






The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.



Hi, what about plotting libraries like matplotlib and seaborn.

 

0

Great news!
0

How about pretty much everything supported by Anaconda?

3

Another +1 for xgboost, keras, theano and tensorflow
2

Hi guys I just landed here and I'm setting up the enviroment. Is there an up to date list of the current available python libraries? How are you guys doing in order to use Keras, Tensorflow, etc. in your algorithms? I saw something about porting data via Lean. Any help on that is appreciated.  

0

GREAT

0

I also think DEAP would make an amazing addition for python users.
2

+1 for more resources on how to enable debugging python scripts in VS lean locally. So far, I found only this. Does it work for others seamlessly?

2

i cound't get it to work either. actually i can't even get the 'auto suggestion' to work. for example when we type 'pandas. ', no suggestion pop up

 

0

Please white-list seaborn as well, thx!

0

Woulld it make sense, secuirty wise, to consider the Dropbox(or other cloud storage api like google storage, etc) package as a quick way to allow for uploading files to a cloud storage? Might be considered a lazy/terrible quickfix to algo/model persistance untill that feature is platform wide?

https://stackoverflow.com/questions/23894221/upload-file-to-my-dropbox-from-python-script
1

Would be great if add PyTorch as well. Thanks!

1

I would like to have the NLTK library (natural language processing)

1

Is there a list of the python libraries that are supported and the version #'s?

I am seeing some known errors with scipy and I'd like to know which version is currently deployed.

Thanks!

Rob

0

Rob Robinson you can see the 'install' scripts here to see exactly what is in the master(may not be live in the cloud yet) version.

To get the working version perhaps you can try something like:
import x as X
#inside init
self.Log(str(X.__version__))

0

That worked great - thanks!

FWIW scipy shows it is installed as version 0.19.1.

#import pycparser
#import pandas
import scipy
#import numpy
#import sklearn
#import blaze
#import cvxopt
#import cvxpy
#import pykalman
#import statistics
#import statsmodels
#import arch
#import copulalib
#import xgboost
#import theano
#import keras
#import tensorflow
#import deap

class BasicTemplateAlgorithm(QCAlgorithm):

def Initialize(self):

self.Log(str(scipy.__version__))

def OnData(self, slice):

pass
0

How to use the latest python 3.0 here? I saw it is supporting python 2.0

2

Does Python Net allow to install talib? Would be useful. I know you support about 100 indicators, but the way TA-LIB manages is different (using Pandas Dataframe, and also is easier to migrate Quantopian algos. 

Thanks.

1

1

Hi guys, I think most of the requests have been addressed.
Leo Striker, Lean support Python 3.6.
Gabriel Moncarz, ta-lib is white-listed.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed