Essays in asset pricing and machine learning