I would like to get historical (e.g. trailing twelve month) fundamental data in my algorithm. The fine fundamentals available during universe selection only have the most recent quarter or most recent full year values as far as I can tell.  I've seen other forum posts recommending to move the backtest start date earlier so it has time to collect the data, but this is not good for a few reasons: it won't work for a live algorithm, it makes porting research code to backtest much more involved, and I have use cases where I may want a longer period (5-10 years) of historical fundamental data.

So, why can't I just instantiate a QuantBook inside my algorithm and call GetFundamental()? It seems to work (see attached backtest). It would be easy to write a simple wrapper that prevents forward bias by enforcing calls to GetFundamental() do not ask for any data past current algorithm time.

Questions:

- Is there any reason GetFundamental() is not in QCAlgorithm, with the same guardraiils against forward bias that is there for History()?  This would be much preferred to my hack.

- Are there any framework issues that may arise with instantiating a QuantBook and calling GetFundamental() inside a backtest? From the code it looks like it shouldn't affect any global state but I am not too familiar with the internals of LEAN.  

Thanks,Karthik

Author