My algorithm holds multiple timeframes. Currently, I rely on an indicator set to a given timeframe where its value is updated by the consolidator. However I've since moved on to analyzing the 'raw' time series data (seasonal_decompose) which relies on timestamp indeces to automatically select the preferred frequency for analysis. Since my consolidator datapoints aren't in Pandas DataFrame format (close prices only, no timestamps), I need a way to create and add to a custom pandas dataframe.

So given a list of timeframes, symbols and consolidators (see notebook), how do I:

1) Create a custom empty pandas dataframe (I will do this during OnSecuritiesChanged in my algorithm) in which it indexes rows by timestamp and the columns are the symbols.

2) Update that dataframe (consolidator's OnConsolidated handle), where the current row's index is the TradeBar's timestamp, and the column the data goes in is respective to its symbol.

Author