Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Controlling Multiple Algos

A couple of posts today have reminded me of a question I have. David Edwards asked here (https://www.quantopian.com/posts/questions-from-gary-and-david) about multiple algos running against an IB account, and here (https://www.quantopian.com/posts/feature-requests-what-changes-would-you-like-to-see) he proposed a feature to allow algos to communicate via pandas to_csv and fetcher.

I'm thinking ahead to running multiple algos. I would like to monitor those algo 'centrally' and reallocate capital away from the worst performing to the best performing. But how to do this?

I don't think the writing of a CSV by an algo will ever be allowed by Quantopioan but in a post here (https://www.quantopian.com/posts/is-there-an-output-data-file-which-is-generated-via-backtester) Dan suggests that metrics might be exportable to a file in the future. This file could be parsed outside of Quantopian and an 'allocation' CSV generated that could be read by each algo before the start of a trading day.

But this seems very primitive. The metrics are determined by Quantopian and fetcher, as I understand it, will be called once per day.

Has anyone else thought about this scenario?

P.

4 responses

We definitely have thought about supporting multiple algos being run by a single, overall strategy. It makes a lot of sense and it's definitely done in practice today by fund managers. For now, it's going to have to be manually done. A couple options:

  • Actually put the multiple algos in a single Quantopian algo, each in its own function, and have a "master function" that controls the allocation to the sub-functions
  • Run each algo against its own IB account, and manually control how much capital is given to each algo/account pair

In the long run, I expect that we'll provide more easy and automated ways for customers to run a suite of algorithms. But we have a lot of plumbing to do before we can enable a feature like that.

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.

Hello Dan,

I have been thinking about the 'multi-functional' algo. Especially if your pricing model becomes $X pcm per live running algo!

P.

I have thought about this, right now it seems like putting multiple algos into one to manage them is the only viable option if you need the process automated. One concern might be computational time, i'm not sure how to run multiple algos in parallel from one. It shouldn't be a huge issue though, Quantopian only gets minute bar data anyway. I'd like to send signals between algos eventually but we will see how the IB/Quantopian relationship works in practice first.