The current get_fundamentals() API can filter only based on the stored values.
These are not accurate or current on any particular day.
The Enterprise Value(EV) is not current for the day and needs to be calculated based on the last closing price.
Values like EBITDA also seem to monthly, so I have to query for the last "4q" and sum them before I can calculate annual EBITDA
Then calculate EV_TO_EBITDA.
Then filter across all the stocks.
Not sure how to do this.
I would like to do it in the before_trading_start(context, data), API.
But the "data" object in this API does not have price information for all the stocks. Only the dollar-volume universe.
Or does it?
The last time checked on this wa about a year ago and was told that this under development.
How do I do this?