On https://www.quantopian.com/posts/march-prize-algorithm-restart, Jonathan Kamens revealed:
history() data comes from our historical data, not from Nanex data, even in live trading
So, when backtesting, the data come from the historical data source exclusively (not Nanex). And in live trading, presumably prior day's data come from the historical source, but for the current day, the data come from Nanex? So, history() returns data from both the historical data source and the accumulated Nanex feed for the day? Or is the Nanex feed only supplying the current price (i.e. from the last trading minute), and the historical data vendor is supplying a real-time feed for all other trailing minutes?
Reading https://www.quantopian.com/faq#data, it is not clear (at least to me), that the data used for live trading are derived from two different sources. It would be easy to assume that it all comes from Nanex:
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.
One take-away here is that if you want guarantee your trailing data to match the data used in your algo at any point in time, you'll need to accumulate your own data, rather that using history() (unless Q is performing the check, and fixing the historical data, assuming that Nanex is the authoritative source). The problem is that there is no way to pull up the Nanex feed data, as one can do for the historical data, which are available in the research platform.