Hi,
I want to use the fundamental data of ebit_ev (ebit to ev). Since the Morningstar has no such a parameter but the ebit and ev, so I want to build it myself. I did as follow:
class EBIT_EV(CustomFactor):
# get most recent price to earnings ratio
inputs = [mstar.income_statement.ebit,
mstar.valuation.enterprise_value]
window_length = 1
def compute(self, today, assets, out, ebit_last, ev_last):
out[:] = ebit_last[-1] / ev_last[-1]
At the first glance is seems OK, but the problem is, if both the ebit and ev negativ it, the ebit_ev is positive. This must be filtered out.
Has someone idea?
Cheers
Thomas