If I've followed all of the details, the Quantopian API paradigm is to trade on "Quantopian time" by executing handle_data every minute (presumably all algorithms are synchronized in some fashion to the same clock). External data are timestamped according to the algorithm clock:
- OHLCV bars carry minutely timestamps
- The timing of orders, etc. to and from Interactive Brokers in reported as minutely
The problem I see is that information is being lost to the algorithm.
On https://www.quantopian.com/faq, it states:
For paper trading and real-money trading, we get a realtime feed of
trades from Nanex's NxCore product. Those trades are bundled into
one-minute bars and fed to the trading algorithms. Paper trading data
is provided on a 15-minute delay. Real-money trading is processed
without delay.
So, it appears that Quantopian has access to the Nanex NxCore timestamps of the OHLC data for the minute, but does not provide them to the algorithm. My suggestion is that the actual OHLC timestamps be available to the algorithm, since the OHLC data are actually time series data. One would expect the O/C values to fall close to the Quantopian minutely start/stop, however, the timing of the H/L values is lost.
Regarding information from Interactive Brokers, I get the sense that there is a bunch of time-stamped data available that is not returned to the algorithm. For example, as Alisa clarified on https://www.quantopian.com/posts/position-entry-date, the actual timestamp of the order fulfillment is not provided to the algorithm.
I sort of have a feel for the architectural decision to run algorithms on minutely "Quantopian time" but it appears that in trying to simplify trading (and provide a universal API), some information is selectively excluded. My advice is not to hold back, since you never know if a useful "indicator" might be derived from the information. If Quantopian members are sophisticated enough to write profitable algorithms, they'll be able to handle the additional information (and maybe even figure out clever ways to use it that you had not anticipated).
Grant