Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
order_optimal_portfolio - order types?

Hi all - what type of order does order_optimal_portfolio generate? Is it a market order? How are fills simulated? I am asking because I sometimes see fills much later in the day than when the order should have been placed.

Thank you.

2 responses

Market orders. Because the requirement to use $10M requires large orders, those are partial fills.

https://www.google.com/search?q=slippage+site:quantopian.com

They'll go away with this in testing, saying to always fill:

def initialize(context):  
    set_slippage(slippage.FixedSlippage(spread=0.0))  

To reduce partial fills, many are filtering in pipeline for large dollar volume, and increasing the number of stocks.
But the more stocks, the weaker the signals.

To see orders in detail in the logging window, you could modify this to filter for just a few specific symbols. Otherwise it would hit logging limits: https://www.quantopian.com/posts/track-orders

thank you for the quick response - appreciate the help.