Back

Unresolved QCAlgorithm in pycharm

Hi,

Please bear with me as I'm new to both python and QC.

I'm trying to code in pycharm and I see QCAlgorithm and related QC types are unresolved and unrecognised.

I've downloaded LEAN zip file from github and I have added the following dir in pycharm File->Settings->Project Interpreter -> Interpreter Paths

Lean-master\packages\QuantConnect.pythonnet.1.0.5.30\lib\win

 

But that doesn't seem to make a difference.

Note that I have installed skylight and in pycharm I just want to code and be able to benefit from intellisense/AutoComplete locally.

 

I greatly appreciate your help!

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.


I must add that I have thses lines at the start of the file too:

 

from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Common")

from System import *
from QuantConnect import *
from QuantConnect.Algorithm import *
import numpy as np

 But clr and AddReference both are also unresolved!
0

Hi Jambo,

The clr AddReference just adds a reference to the C# binaries. The imports don't translate into python libraries that the autocomplete can use. We've been working on providing support for Python autocomplete locally, but it is not ready for release yet.

Best,
Derek Melchin

1

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