I want to generate a series for forward P/E ratio as: Price / Sum(next 4 quarters earnings).
I am using request.earnings() as follows (it is supposeed to deliver future earnings as well?):
ee = request.earnings(syminfo.tickerid, earnings.estimate, gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
My intention is to sum the 4 next eps, and then fPE = close / next_year_earnings
; but I am not sure how to do this. So far, I’ve only used series for historical data.
Thanks for your help.
Velin Alexandrov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.