How do I actually run my alto through the lean engine on a local device?

Back

Hi,

Facing some confusion based off the instrucitons. Still learning but I figured this would be the best spot. 

Followed the instrucitons on Git, installed VS and docker, seems like everything is pushed through and works. The test algo worked and returned statistics.

That being said, i was hoping to be able to run my algo through on my local machine. Main reason for this is that I want to eventually expand it to use TD Ameritrade (my primary broker) and I would also like to incorporate using a CSV export to determine the securities in the investable universe.

My main question here is how could/should I set my system up to be able to run the algo I have written in QC? Should the files be located in the LEAN engine folder? Is there a quick way to send it all over to docker once it is run? How do I run these py files on a local environment?

Additionally: Is there a way to add a momentum indicator for all stocks within a universe? I tried using the below but its not working so I figure it is the wrong syntax. Is there a library where I can find the syntax for these functions?

        for security in sortedByDollarVolume:
            self.security.Ticker.Momentum = self.MOMP(security.Ticker, 50, Resolution.Minute)

Thank you in advance for your help. I apologize if the answer may seem elementary but trying to learn!

 

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.


Hi Miguel,

To run local algorithms, the project code should be placed in the Algorithm directory. We then need to point to the project inside the config file. Refer to our readme for detailed instructions. Note that most of our data is not free. Data needs to be streamed to your computer to trade locally with LEAN.

The syntax for the indicators is listed in our documentation here. When creating indicators for a dynamic universe, we should use the full class name (MomentumPercent) and set up a consolidator to ensure the algorithm unsubscribes to the data feed once the security is removed from the universe. Refer to this strategy for an example.

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...

To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!