I am trying to get the historic 5 year average dilluted EPS , some reason the value calculated is not matching with Morningstar value. EPS calculation is based on the mean of EPS for the past 5 years,
out[:] = np.mean(inputs[-252*5:], axis=0)
Is this the correct approach or do we have a better way to calculate the same.
Please find the attached notebook.