[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-120493-en":3,"doc-seo-120493-105":31,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":28,"seo_description":14,"update_tm":29,"read_time":30},120493,13056703019662,"Evangeline","https://ap-avatar.wpscdn.com/avatar/be000253a8e92610077?_k=1778726343310543188",8,"Research & Report","Comparing Machine Learning Models for Indonesia Stock Market Prediction - SVR vs RF vs KNN","Accurate stock price forecasting remains difficult in volatile markets such as Indonesia, where financial time series show nonlinear and unpredictable behavior. This study compares three supervised machine learning algorithms—random forest (RF), support vector regression (SVR), and K-nearest neighbor (KNN)—to predict closing prices. Daily historical prices for BBCA, PWON, and TOWR from March 2017 to February 2020 are normalized, split into training and testing sets, and evaluated using RMSE and MAE. Results show SVR consistently achieves the lowest errors across stocks, outperforming RF and KNN.","Comparing machine learning models for Indonesia stock  \nmarket prediction  \nSelly Anastassia Amellia Kharis1, Arman Haqqi Anna Zili2, Maulana Malik2, Wahyu Nuryaningrum2, Agustiani Putri3  \n1Department of Mathematics, Faculty of Science and Technology, Universitas Terbuka, Tangerang, Indonesia 2Department of Mathematics, Faculty of Mathematics and Natural Sciences, Universitas Indonesia, Depok, Indonesia 3Department of Mathematics, Faculty of Mathematics and Natural Sciences, Universitas Negeri Malang, Malang, Indonesia  \n\n| Article history:\u003Cbr>Received Feb 19, 2024 Revised Oct 17, 2024 Accepted Oct 30, 2024 | The financial market hold a significant role in the economy and the ability to accurately predict stock prices poses a major challenge, particularly in volatile markets like Indonesia. This study investigates the application of three supervised machine learning algorithms: random forest (RF), support vector regression (SVR), K-nearest neighbor (KNN) to predict the closing prices of stocks. The data used in this research consists of BBCA, PWON, and TOWR stocks. This study adopted daily historical stock prices from March 2017 to February 2020, which were normalized and segmented into training and testing datasets. The models were trained using machine learning techniques, and their predictive accuracy was evaluated using root mean square error (RMSE) and mean absolute error (MAE) . The historical stock data includes Open, High, Low, and Close prices. The result indicated that SVR consistently outperforms RF and KNN in terms of RMSE and MAE across different stocks. The SVR method produced RMSE values of 4.79% for BBCA stock, 10.61% for PWON stock, and 15. 14% for TOWR stock, and produces MAE values of 3.52% for BBCA stock, 8.49% for PWON stock, and 13.78% for TOWR stock.\u003Cbr>This is an open access article under the CC BY-SA license.\u003Cbr> |\n| --- | --- |\n| Keywords:\u003Cbr>Investment\u003Cbr>K-nearest neighbor Random forest\u003Cbr>Stock price prediction Support vector regression |  |\n\nCorresponding Author:  \nSelly Anastassia Amellia Kharis  \nDepartment of Mathematics, Faculty of Science and Technology, Universitas Terbuka 15418 South Tangerang, Banten, Indonesia  \nEmail: [selly@ecampus.ut.ac.id](selly@ecampus.ut.ac.id)  \nArticle Info ABSTRACT  \n1. INTRODUCTION  \nThe welfare of any growing nation, economy, or community in the 21 st century primarily rests over their stock price and market economy, by the financial market serving as the key pillar [1], [2] . Financial markets remain unquestionably foremost among the most exhilarating inventions of recent years. Getting precise forecasts for financial future time series recently remains a challenging undertaking for numerous scholars [3]-[5], especially owing to the presence of nonlinear, irregular, and unpredictable nature [6] . By the advent of quantitative financial management, accurate forecasts of stock price shifts are essential for investment approaches, which has captured the considerable enthusiasm from companies and scholars. Despite machine learning models are frequently used in emerging markets, a significant gap exists in understanding their effectiveness, particularly in volatile regions like Indonesia. This study addresses to bridge that gap by comparing the performance of three machine learning models: random forest (RF), support vector regression (SVR), and K-nearest neighbor (KNN) within the Indonesian stock market context.  \nForecasting stock prices in emerging markets such as Indonesia be a difficult issue due to inherent volatility, nonlinear behavior, and the influence of various economic, political, and psychological factors.  \nTraditional statistical models often struggle to account for these complexities, leading to inaccurate predictions and potential financial losses [7], [8] . In the context of the Indonesian stock market, prevalent literature indicates that stock prices are influenced by various factors including political issues, economic conditions, commodity pr","cbCaijigwIgxGFjn","https://ap.wps.com/l/cbCaijigwIgxGFjn","pdf",482811,3,1,9,"English","en",105,"# Abstract\n# Introduction\n## Research gap in emerging markets\n## Challenges in Indonesian stock forecasting\n# Data and Methods\n## Algorithms compared: RF, SVR, KNN\n## Data normalization and train-test split\n# Results and Evaluation\n## Metrics: RMSE and MAE","[{\"question\":\"Which machine learning models are compared for Indonesian stock price prediction?\",\"answer\":\"The study compares random forest (RF), support vector regression (SVR), and K-nearest neighbor (KNN).\"},{\"question\":\"What dataset and time period are used in the experiments?\",\"answer\":\"Daily historical prices for BBCA, PWON, and TOWR are used from March 2017 to February 2020, then normalized and divided into training and testing datasets.\"},{\"question\":\"How is model performance evaluated?\",\"answer\":\"Performance is evaluated using root mean square error (RMSE) and mean absolute error (MAE) on predicted closing prices.\"}]","Comparing Machine Learning Models for Indonesia Stock Market Prediction - SVR vs RF vs KNN | PDF",1785730351,23,{"code":4,"msg":32,"data":33},"ok",{"site_id":25,"language":24,"slug":34,"title":13,"keywords":35,"description":14,"schema_data":36,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":29},"comparing-machine-learning-models-for-indonesia-stock-market-prediction-svr-vs-rf-vs-knn","",{"@graph":37,"@context":86},[38,54,69],{"@type":39,"itemListElement":40},"BreadcrumbList",[41,45,49,51],{"item":42,"name":43,"@type":44,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":46,"name":47,"@type":44,"position":48},"https://docshare.wps.com/document/","Document",2,{"item":50,"name":12,"@type":44,"position":20},"https://docshare.wps.com/document/research-report/",{"item":52,"name":13,"@type":44,"position":53},"https://docshare.wps.com/document/comparing-machine-learning-models-for-indonesia-stock-market-prediction-svr-vs-rf-vs-knn/120493/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":24,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":42,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-05","2026-08-03",true,{"@type":66,"interactionType":67,"userInteractionCount":20},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"Which machine learning models are compared for Indonesian stock price prediction?","Question",{"text":76,"@type":77},"The study compares random forest (RF), support vector regression (SVR), and K-nearest neighbor (KNN).","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"What dataset and time period are used in the experiments?",{"text":81,"@type":77},"Daily historical prices for BBCA, PWON, and TOWR are used from March 2017 to February 2020, then normalized and divided into training and testing datasets.",{"name":83,"@type":74,"acceptedAnswer":84},"How is model performance evaluated?",{"text":85,"@type":77},"Performance is evaluated using root mean square error (RMSE) and mean absolute error (MAE) on predicted closing prices.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":93},[94,98,102,106,111,116,121,124,128,131,135],{"id":21,"doc_module":4,"doc_module_name":47,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":48,"doc_module":4,"doc_module_name":47,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":47,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":47,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":47,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":47,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":47,"category_name":12,"show_sort_weight":122,"slug":123},30,"research-report",{"id":22,"doc_module":4,"doc_module_name":47,"category_name":125,"show_sort_weight":126,"slug":127},"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":47,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":47,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":47,"category_name":137,"show_sort_weight":107,"slug":138},19,"General","general"]