Execute orders on today's close instead of tomorrow when using daily prices

141 views
Skip to first unread message

Pravin Bezwada

unread,
Aug 20, 2015, 6:53:29 AM8/20/15
to Zipline Python Opensource Backtester
Hi,

I want to use zipline with daily closing prices of some stocks. However, when I execute order as I understand they will be filled at the next day's close. Is there anyway to force orders to fill on the same day in the absence of minute data and using only daily prices?

Best regards,
Pravin

Dan Dunn

unread,
Aug 23, 2015, 1:17:58 PM8/23/15
to Pravin Bezwada, Zipline Python Opensource Backtester
Hypothetically, you could use a custom slippage model to fill your orders in the same day.

However, note that you incur significant risk of look-ahead bias if you're using the same price as your signal and your fill price.  There's just no way that you can expect that to work out in the market.

Dan

--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Sanderson

unread,
Aug 25, 2015, 1:12:08 PM8/25/15
to Zipline Python Opensource Backtester, pravin....@gmail.com
If you're using Zipline standalone, you can pass instant_fill=True to TradingAlgorithm, which I implements what you want I think

-Scott
Reply all
Reply to author
Forward
0 new messages