Faktör Yatırımı

Machine Learning Stock Selection: How the ML Portfolio Works on BIST

TL;DR

Stock selection using machine learning enables the prediction of future stock prices by analyzing historical data through models like XGBoost, LightGBM, Random Forest, and Ridge Regression on BIST. This method provides investors with the opportunity to make more informed decisions.

7 min read

Machine learning goes one step beyond traditional factor investing: instead of ranking by individual factors separately, it evaluates multiple features simultaneously to predict stock returns. Borsafolio's ML Ensemble portfolio combines predictions from four different models.

The Ensemble Approach

Combining four models' predictions rather than relying on a single model reduces overfitting risk. The models: XGBoost — captures strong nonlinear relationships via gradient boosting; LightGBM — fast and efficient on large datasets; Random Forest — stable predictions from a tree ensemble; Ridge Regression — regularized linear model, simple but robust.

26 Features

Each model uses 26 features: momentum factor metrics (21d, 63d, 252d Sortino and price momentum), volatility (21d and 63d standard deviation), valuation (quarterly and TTM E/P, P/B), quality (ROE, ROA, net margin, revenue growth, debt/equity), and technical indicators. This broad feature set lets the model weight different signals under different market conditions.

Walk-Forward Training

ML models can overfit historical data. Walk-forward training mitigates this: each month, the model is trained only on data available up to that date, never seeing future data. This approach increases backtest realism and prevents look-ahead bias.

Results and Limitations

The ML Ensemble produces smooth returns but no clear alpha over simpler multi-factor combinations. This is worth highlighting: in a 500-stock universe with noisy, inflation-distorted data, added model complexity doesn't always translate to added performance. Occam's razor applies — sometimes a simple 2-3 factor portfolio performs as well as complex ML models.

See the ML Ensemble portfolio's current holdings and performance.
Go to Portfolios →

Related articles: What Is Factor Investing?, 10-Year BIST Factor Analysis, AI and the Stock Market.

Frequently Asked Questions

What is machine learning?
Machine learning is a branch of artificial intelligence that allows computer systems to perform specific tasks by learning from data. This process aims to make predictions about the future using historical data.
How are stock prices predicted using machine learning?
Machine learning analyzes historical stock data to predict future price movements. For example, by examining the past performance of stocks like THYAO and EREGL, insights about their future potential can be gained.
What is factor investing?
Factor investing is the process of selecting stocks based on specific characteristics. It typically focuses on factors such as value, growth, and momentum to predict the long-term performance of stocks.
What is the difference between supervised and unsupervised learning?
In supervised learning, the model is trained with a labeled dataset, while in unsupervised learning, the data is unlabeled and the model tries to identify hidden structures. For instance, the historical prices of GARAN can be analyzed using supervised learning.
What tools does Borsafolio.com offer?
Borsafolio.com offers tools such as stock screening, portfolio creation, and seasonality analysis. These tools assist investors in developing more effective strategies and simplifying risk management.
This content does not constitute investment advice. Past performance is not a guarantee of future results. Make your investment decisions based on your own risk profile.
Related Articles
Temettü Politikası ve Değerleme: Borsa İstanbul'da Temettü Verimi ve Kalite Faktörünün Ampirik İncelemesi
Faktör Yatırımı
Dividend Policy and Valuation: An Empirical Examination of Dividend Yield and the Quality Factor in Borsa İstanbul

How dividend policy and valuation relate to BIST returns: Miller-Modigliani, dividend yield, the quality filter and the value premium, examined empirically.

Borsa İstanbul'da Faktör Yatırımı: Değer, Momentum, Düşük Volatilite ve Kalite Primlerinin Ampirik Bir İncelemesi
Faktör Yatırımı
Factor Investing in Borsa İstanbul: An Empirical Examination of Value, Momentum, Low-Volatility and Quality Premia

A ~10-year empirical study of momentum, low-volatility, value and quality factors on BIST: methodology, findings, Sharpe ratios and academic literature.

BIST'te Faktör Yatırımı: 6 Stratejinin 10 Yıllık Performans Analizi
Faktör Yatırımı
Factor Investing on BIST: 10-Year Performance Analysis of 6 Strategies

Ten-year backtest results, academic foundations and comparative performance of momentum, value, low volatility, quality, dividend and machine learning factor portfolios on Borsa Istanbul.

Early access —
First 1,000 users get 1 year Premium free
No credit card needed
Sign Up Free
← All Articles