THE PREDICTION OF STOCK PRICES WITH k-NN (K- NEAREST NEIGBOUR) ALGORITHM: A SAMPLE APPLICATION FROM BIST
k-EN YAKIN KOMŞU (k-NN) ALGORİTMASI İLE HİSSE SENEDİ FİYATLARININ TAHMİN EDİLMESİ BİST’DEN ÖRNEK BİR UYGULAMA

Author : Kenan İLARSLAN
Number of pages : 375-392

Abstract

In this study stock prices of the next day is aimed to be predicted. K-nearest neighbour algorithm, which is one of data mining method was used for this purpose. The Afyon Çimento stocks which are traded in BIST are taken as a data set based on closing prices of 2014. In order to make prediction with k-nn algorithm, the number of k parameter (the number of nearest neighbours) need to be known first. For that reason the most appropriate number of parameter is determined as a six after the analysis made with the 10 fold cross valiation method. Then the performance of a constructed model is tested. In this context, the price predictions made considering the first three months of 2015 and compared with the real prices. Consequently it is found that the prediction made by using k-nn algorithm has as high as %97 accuracy on average.

Keywords

Financial Prediction, Cross Val

Read: 666

Download: 201