Resumo:
The dissertation examines portfolio optimization by combining Markowitz's Theory with the Random Forest machine learning model. Using weekly data from highly liquid assets on B3, the study aims to improve return forecasting and maximize the risk-return ratio. The methodology involves using Python for data manipulation and model implementation, with a division of data into training and testing sets. The study demonstrated that integrating machine learning brings benefits to the portfolio. The results suggest that this hybrid approach is promising for portfolio management in dynamic and uncertain markets, establishing machine learning as an effective tool for return forecasting and financial risk reduction. The hybrid Random-Forest/Markowitz model outperformed the traditional method across all performance criteria, achieving an accumulated return of 84.20%, significantly higher than the 12.08% of the Traditional-Markowitz model. Moreover, the hybrid model achieved more positive weeks (108) compared to the traditional approach (97), indicating greater consistency in gains over time. During periods of low market intensity, the Random Forest model limited losses to a maximum of -51.14% and achieved a high Treynor Ratio (1.46) compared to the negative result of the traditional model (-0.15). The high Information Ratio (18.31) further highlights the hybrid model's ability to capture market opportunities and minimize systemic risks. In terms of diversification and risk control, the hybrid portfolios exhibited a more efficient and robust allocation in the face of volatile markets. These results suggest that incorporating machine learning into return forecasting can enhance financial management, enabling more effective asset allocation under uncertain conditions. The hybrid approach proved promising, indicating that advanced methods like Random Forest are useful strategies for constructing more efficient and resilient portfolios in dynamic and unpredictable economic scenarios.