Publication:
Stock trend prediction and portfolio optimization

Placeholder

Institution Authors

Research Projects

Journal Title

Journal ISSN

Volume Title

Type

Master's thesis

Access

info:eu-repo/semantics/restrictedAccess

Publication Status

Unpublished

Journal Issue

Abstract

This thesis aims to predict trend movement of closing price of stock and to maximize investment portfolio by utilizing the predictions. In this context, the study aims to define a stock portfolio strategy from models created by using Logistic Regression, Gradient Boosting and Random Forest Methods. Recently, predicting the trend of stock price has gained a significance role in making buy and sell decisions and generating returns with investment strategies formed by machine learning basis decisions. There are plenty of studies in the literature on the prediction of stock prices in capital markets using machine learning methods but most of them focus on closing prices instead of the direction of price trend. Our study differs from literature in terms of target definition. Our target definition is a classification problem which is focusing on the market trend in next 20 trading days. To predict trend direction, fourteen years of data were used for training. Following three years were used for validation. Finally, last three years were used for testing. Training data are between 2002-06-18 and 2016-12-30. Validation data are between 2017-01-02 and 2019-12-31. Testing data are between 2020-01-02 and 2022-03-17. We determine Hold Stock Portfolio, Best Stock Portfolio and USD-TRY Exchange rate as benchmarks which we should outperform. We compared our machine learning basis portfolio return on test data with return of Hold Stock Portfolio, Best Stock Portfolio and USD-TRY Exchange rate. We assessed our model performance with the help of roc-auc score and lift charts. In our study, we use logistic regression, Gradient Boosting and Random Fores with grid search approach to fine-tune hyper-parameters. As a result of the empirical study, the existence of uptrend and downtrend of five stocks could not be predicted by the models. When we use these predictions to define buy and sell decisions in order to generate model-based-portfolio, model-based-portfolio fails in test data-set. It was found that Model-based buy and sell decisions generated a stock portfolio strategy whose returns can not outperform non-model portfolio strategies on test data-set.
Tezin amacı hisse senedinin kapanış fiyatlarını dikkate alarak trend tahmini yapmak ve bu tahminleri kullanarak oluşturulan hisse senedi portföyünün karını maksimuma getirmektir. Bu kapsamda, calışmanın amacı lojistik regresyon, gradient boosting and random forest methodlarını kullanarak yaratılan makine öğrenmesi modelinin tahminlerini kullanarak hisse senedi portföyü oluşturmaktır. Son zamanlarda, hisse senedi fiyatının trendini tahmin etmek, makine öğrenmesi temelli kararlarla oluşturulan yatırım stratejileri ile alım satım kararlarının alınmasında ve getiri elde edilmesinde önemli bir rol kazanmıştır. Literatürde sermaye piyasalarında hisse senedi fiyatlarının makine öğrenmesi yöntemleri kullanılarak tahmin edilmesine yönelik çok sayıda çalışma bulunmaktadır ancak bunların çoğu fiyat trendinin yönü yerine kapanış fiyatlarına odaklanmaktadır. Çalışmamız hedef tanımı acısından literatürden farklılık göstermektedir. Hedef tanımımız, önümüzdeki 20 işlem günündeki oluşacak trende odaklanan bir sınıflandırma problemidir. Eğilim yönünü tahmin etmek için training yani eğitim için on dört yıllık veri kullanıldı. 3 yıllık veri validasyon, sonraki 3 yıllık veri test için kullanıldı. Eğitim datası 2002-06-18 ile 2016-12-30 arasındadır. Validasyon datası 2017-01-02 ile 2019-12-31 arasındadır. Test datası 2020-01-02 ile 2022-03-17 arasındadır. Elde Tutma Hisse Senedi Portföyü, TL Vadeli Mevduat Hesabı ve USD-TRY Doviz kurunu daha iyi performans göstermemiz gereken kriterler olarak belirledik. Test verilerindeki makine öğrenimi bazlı portföy getirisini, Elde Tutma Hisse Portföyü, TL Vadeli Mevduat Hesabı ve USD-TRY Doviz kuru getirisi ile karşılaştırdık. Model performanslarını Roc skor ve Lift grafik ile değerlendirdik. Çalışmamızda, lojistik regresyon, gradient boosting ve random forest methodlarını kullandık ve validasyon datasında en yüksek roc skorunu elde eden modeli seçtik. Model seçiminde hyperparameter tuning için grid search kullanıldı. Çalışma sonucunda seçmiş olduğumuz beş hisse senedinin yükseliş ve düşüş trendinin varlığı modeller ile tahmin edilememiştir. Model tabanlı portföy oluşturmak amacıyla alım satım kararlarını tanımlamak için model tahminlerini kullandığımızda, model tabanlı portföy test veri setinde başarısız olmuştur. Model tabanlı alım satım kararlarının meydana getirdiği portföy stratejisi, test veri setinde model bağımsız portföylerin getiri değerlerini geçememiştir.

Date

Publisher

Description

Keywords

Citation


Page Views

0

File Download

0