With the new history API, is there an elegant way to have the output columns in the same order as a list of sids? For example, in the attached algorithm, I have:
context.stocks = [sid(8554),sid(19920),sid(33652)]
I'd like the dataframe columns to correspond to the list order of 8554, 19920, 33652. As presently coded, the output does not maintain the order:
2013-12-02 PRINT 19920 8554 33652
2013-11-27 21:00:00+00:00 85.22 181.14 80.95
2013-11-29 18:00:00+00:00 85.73 181 80.98
2013-12-02 14:31:00+00:00 85.85 181.17 80.66
Perhaps there is a pandas thingy that will order the columns according to a list?