Building an AI Driven Portfolio Management System: From Machine Learning Basics to Advanced Implementation