I am currently working on a project and one way I want to filter stocks is by how stable their ROIC, FCF, etc. have been over time. 

This would serve to get companies that consistently have a high free cash flow, and in turn have a stable business.

One potential way would be to get the standard deviation over the mean over the past couple of years.

Does anyone know how to implement this or have any other ways to calculate how stable an indicator has been over time?

This explains how to find the mean and standard deviation of price - 

Mean + Standard Deviation of Price Tutorial

Thanks

Author