Machine Learning in Finance: From Theory to Practice