Back to Community
Editing a live trading algo

Hi,

I have a live trading algo runnning. Suppose I open that algo and make a change to the code (and maybe run more backtests). Would those changes be applied to the live algo, or is the code fixed when I hit 'run live' and never modified, even if the source algo is changed?

4 responses

You can edit the algo in the editor and it will not change the version that is live trading. That version is compiled and kept trading until you stop it. To make changes will have to stop the running instance, run a new full backtest with the updated version, and then click 'live trade algorithm' from the new updated version. This will restart the returns and risk metric tracking for your algo though.

Hi Alex,

When you launch a live algo, the code is locked in for the life of that algo. While the algo is running, you are free to experiment with the code and run additional backtests on your profile - these tweaks will not apply the source code of the live trading algo. In order to edit a live algo, you need to manually stop it by pressing the "stop algorithm" button in the live trading dashboard. You are then free to adjust your code and redeploy to the market. It's important to note that when you relaunch you algo, it is considered a "new" algorithm. Your returns, other metrics, and log history will not be carried over. We are considering changing this behavior in the future, to allow you to maintain your algo metrics and history, but it's a tricky question.

Cheers,
Alisa

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

In that case, I suggest allowing the strategy to expose a few knobs that can be adjusted as part of live trading. For example, in my case, I have a 'context.positionSize' argument that determines how large I want to trade. It would be good if I could change that without redeploying the strategy.

Have there been any developments as far as allowing editing of live algos,
and also retaining the original performance data please?