This paper studies the impact of productivity on the flow of financial resources to and from firms. To do this we use machine learning methods (Lasso, XGBoost) to derive a new measure of firm productivity using standard corporate accounts. Output is sales revenue and we find that the key inputs...