Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
[Framework] Modular Framework for trading algorithms

I noticed many quants here have ideas of strategies but they struggle to integrate them in a clean modular implementation. Here is a modular framework designed to allow separate implementation of the different functions inside a trading algo. It comes with the implementation of a basic crossover moving average strategy to illustrate how it works.

Quick explanation of the framework. The central piece of the framework is the portfolio manager that is responsible of the portfolio. It manages alpha generators that are seeking the alpha and ask the portfolio manager for allocation. The portfolio manager gets all the requests of the alpha generator and computes a target portfolio being helped by a risk manager and a transaction cost simulator. It then transmits the target to the execution handler which is responsible of the order strategy to reach the target. All these modules are independant and can easily be modified and used again in other strategies.

2 responses

Nice, there is also a nice framework for complex orders like bracket, trailing. It would be nice if we could have multiple files strategies.
Even if Quantopian compiled it into one file to deploy it would be nice to split strategies into multiple files.

can you update this for Q 2