Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Building an Intrinsic Value Calculator

I want to build an intrinsic value filter. The method of my calculation is simple and straight-forward:

  1. Extract fundamentals data from all Equities from Morningstar for the past 12 quarters (3 years) - mainly free cash flow, revenues, long term debt, interest payable, total stockholder equity, etc
  2. Calculate the intrinsic value of each equity using either the dividend yield method or DCF - based on the annualized growth rates exhibited in past 3 years
  3. Compare the intrinsic value of stock with that of the current stock price. If the intrinsic value > current stock price ; then it should flag it is a BUY

The problem I am facing is to get the past 12 quarters data. How can I efficiently run my pipeline such that it only extracts fundamentals data from the past 12 quarters ? - I attempted to solve this problem by running separate dataframes and different points in the past 12 quarters - the problem I find with this is that firstly there are too many dataframes; and secondly its cumbersome to match the equity level data in each data frame (for example looking for the fundamentals of AAPL in each dataframe)

Does anyone have a better solution to this problem - or someone has already attempted to do this ? Thanks for the help in advance