Back

LEAN: Command Line Utility for Syncing & Running Backtests

Hi,

I published qc, a commandline utility for interacting with Quantconnect.

I wanted a fast mechanism for synging and running my algos with QuantConnect, as copying and pasting code in the web editor to run the backtests wasn't great a workflow, specially when dealing with multiple files. As a Mac user editing with Rider, the Visual Studio plugin wasn't an option for me..

The tool will let you:

  • Push the files that changed to QuantConnect
  • Compile them
  • Run a backtest

The next thing I will add is opening your backtest in the browser when it has finished running. I think I have seen an special URL to do that somewhere in the Lean code.  It's distributed as a ruby gem. It should work fine in Mac or Linux. It should work in Windows too, although not much experience running ruby in Windows to be honest. Please, if you find problems using it or want to request new features, create an issue in github.

Thanks for the hard work on Lean and QuantConnect team. It's an amazing platform.

Update Backtest








Pretty cool Jorge 2000! Thank you for contributing to the open-source ecosystem!

I've given your account a lifetime free subscription to QuantConnect =)

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.


Thank you so much Jared Broad I really appreciate it!

1

I updated the tool so that now you can open your results in quantconnect.com (only in MacOS). I added:

  • An option "--open" that will open the results while running the backtests
  • A command "qc open" that will open the latest results
qc --open # Push, compile and run backtest
qc backtest --open # Run backtest
qc open # Open the results

Under the hood, it essentially opens the project page and simulate a click on the results with Javascript. It uses an Automator workflow, so it only works in MacOS. Not the most elegant solution but does the job.

More info on the README 

https://github.com/jorgemanrubia/qc

I still think it would be a great idea to offer an URL endpoint for showing backtest results

1

Amazing. That's what I was looking for.

Looks like I'll need ruby again after all -_-

0

Hey, I recently updated qc to add some improvements:

  1. It will properly wait to finish the backtest execution before exiting the command
  2. It will display backtest results summary
  3. It will use proper labels for backtests: (project name + counter instead of the long hex backtest id).
  4. It lets you import executions into tradervue
Regarding (4), tradervue  is great for analyzing your backtests results. Among a bunch of analytics and reporting facilities, it lets you see your executions rendered in charts. You can read more about it here:  https://github.com/jorgemanrubia/qc/blob/master/README.md#support-for-importing-trades-into-tradervue-experimental

 

 

Note: I am not affiliate with tradervue or anything, I just happen to like the service.

0

I've been using this tool for uploading files. It has saved me lot of time. Thanks, this tool is great!

0

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