Dear Quantopians,
We will soon be launching a new feature which allows you to run your algorithm easily with daily or minutely bars. During testing, I noticed that switching between minute and daily had very large differences in behavior. Initially, it appeared that my algorithms were never trading on the daily bars. What I discovered was that trades were happening, but in tiny proportions. Imagine a trivial example where you buy N shares of a single stock on every invocation of
handle_events. In a daily simulation, you buy N shares per day. In a minute-ly simulation, you buy 390*N shares per day!
In testing, I've just been multiplying the volume of orders by 390 when I do a day calculation, but this is very tedious and hard to remember. I was wondering what you would like as an interface for this switching. One idea we have is to transparently multiply all order amounts by 390 when you run a daily backtest. That way order(sid(123), 100) would be scaled up in the daily case would be equivalent to:order(sid(123), 3900).
This is based on our expectation that members will want to do iterative development using daily bars, which provide faster results, but then switch to minute data for a fine-grained backtest.
Let us know what you think, and thank you for your help!
thanks,
fawce