Hi undrcvr, I work at Quantopian. We'd love to hear your thoughts on our open-sourced Zipline backtester: https://github.com/quantopian/zipline and learn more about what you're building - there are lots of interesting challenges in this space.
I've been developing my own back tester for quite a while [in Java] and I must say: You guys are doing some interesting stuff and its a challenging area.
We provide a facility for working with trailing windows as pandas dataframes, which are updated by the events. You can control whether those trailing windows have NaN values for missing bars, or if values are filled forward. You'd keep the NaNs if you want your algo to be aware of empty bars (stock is held, thinly traded, etc). You keep the fill forward if you want to avoid coding guards on NaNs :).