Remaining positions for MOC orders

Hi,

I would like to share an observation based on my backtest using MOC orders only to exit positions:

Almost all MOC orders get filled normally. There are still a small number of MOC orders (<1%) that do not get filled. Most of them have small order quantity (<30). And there are about 4 MOC orders with larger order size that do not get filled. I am not sure what causes these orders not to get filled.

Given the small number of such unfilled MOC orders, I don't think they affect the backtest result. However, it is probably still useful to find out why they stay unfilled. I can provide a list of these unfilled MOC orders so we can cross-check to find out the cause.

No market close auction for some symbols on some days during the simulation period is one of the reasons I could think of.

If anyone has some ideas on this issue, please feel free to comment below.

Thanks!

Comments

  • shayneshayne Posts: 70

    johnbear565 - is this cq fast or cq full backtesting?

    • if cq full, all of the exchange rules are enforced (cutoff times, offsetting imbalances...)
    • if you could provide the trade date, time the order was sent and a couple of the order.algo line it would be easier to research.
    • there might also be a reject involved. If so, add a print statement in on_reject() with the event.reason

    e.g.

    def on_reject():
        print symbol, event.reason
    
    

    debugging orders can be tricky.

    -Shayne

Sign In or Register to comment.