Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Blended Consensus Estimates (by date) in Research

I am looking to create a custom factor that calculates a "forward 12 month" earnings estimate.

E.g., if the date is 10/1/2018, then i would take the current year (2018) consensus earnings estimate multiplied by ("12/31/2018" - "10/1/2018")/365.25 plus the next year (2019) consensus earnings estimate multiplied by (1 - ("12/31/2018" - "10/1/2018")/365.25) to get my "forward estimate".

I believe I can accomplish this in the backtester with get_datetime(), but I do not believe this is available in the research environment. Any suggestions? Thank you!