I understand that the recommended way to obtain history data is using RolllingWindow instead of History. But in my algorithm I need to get the data in some matricial way. That is, in numpy array or in pandas DataFrame. So I supose that the logical path is to transforme the RollingWindow data into a array. But if you know another method, I will be very thanksfull if you can show me how.
I'm using the following code to create the array. But, this is not a very efficient method. In fact, it would be better to simply use History method, because returns the data just in the format needed for the algorithm.

def OnData(self,data):
self.data = []
self.assets = ["AAPL", "IBM"]
for asset in self.assets:
self.closes = []
if self.Data[asset].IsReady():
for i in range(self.Bars.Count - 1):