Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
where is the best practice to handle order

hi guys,

I am learning some of the code and I found some people handle the buy/sell trading strategy in the make_pipeline() which by output long and short assets. but others actually write the trading buy/sell strategy in rebalance() method. I was wondering what the best practice and pro and cons of doing it in make_pipeline() vs rebalance?

and one question related to this is how often the make_pipleline() and rebalane() is called?
could any one suggest? that is pretty crucial for beginner to understand behind the scene.

thanks a lot

1 response

Hi all,
when I exploring this concept, I found a thread answers the question as below:

initialize executed exactly once when the algorithm starts
before_trading_start executed before the
market opens each day the market is open
handle_data executed
every minute during trading hours

these information is very helpful for quantopian newbie and thanks for the community. but my question still there, if initialize only called once algorithm starts, does that mean make_pipeline is call once as well since it is inside initialize? if thats the case as the trading strategy (pickingup securities filters) are in make_pipeline and it will not be updated again once algorithm starts which does not make sense.\

so how make_pipeline() was called? can any one pls suggest?