I am designing an algorithm that is performing an historical analysis on different timeframes and I need to get the historical data and feed it to my model to initialize it before being able to calculate predictions. However, I need to pass those data to the consolidators to aggregate the data to the different timeframes. 

How can I do this with C#?