Academic Journal
Forecasting financial markets using the random forest algorithm
| Title: | Forecasting financial markets using the random forest algorithm |
|---|---|
| Source: | Reporter of the Priazovskyi State Technical University. Section: Technical sciences; No. 47 (2023): Reporter of the Priazovskyi State Technical University. Section: Technical sciences; 100-108 Вестник Приазовского государственного технического университета. Серия: Технические науки; № 47 (2023): Вісник ПДТУ. Серія: Технічні науки; 100-108 Вісник Приазовського Державного Технічного Університету. Серія: Технічні науки; № 47 (2023): Вісник ПДТУ. Серія: Технічні науки; 100-108 |
| Publisher Information: | Priazovskyi state technical university, 2023. |
| Publication Year: | 2023 |
| Subject Terms: | Scikit-Learn, training sample, machine learning, Randomforestregressor, обучаюча вибірка, середньоквадратична помилка, машинне навчання, mean square error, Python |
| Description: | The article provides material on the analysis of the financial market using the random forest algorithm. The general problem of forecasting financial markets and the role of modern technologies for accurate forecasts and automation of trading strategies are considered. An overview of existing forecasting models and the possibility of their application for financial markets was conducted. The latest studies and publications were analyzed, on the basis of which a research program was developed. The created program has a modular structure and represents a library that can be used for further research. A neural network was built and trained, which, using a random forest algorithm, can perform analysis over a certain period and provide predictions. As part of the research, open data and an analysis of the Apple company were used. During the experiments, an analysis of the accuracy of the model under the influence of hyperparameters, an analysis of the model's operation under different market conditions, a comparison with other forecasting methods, and an analysis of the impact of the amount of data on the accuracy of the model were made. Several neural network mathematical models were built for market forecasting. After that, they were trained on the selected datasets. For training, information was taken for a long period of time, data for quarters, daily profit, profit for a year. The software was written in Python, a number of libraries were used, namely yfinance, Sklearn-Scikit-learn, Matplotlib.pyplot, Pandas. Experimental studies compared the results of different approaches to analysis. Models using the random forest method and the linear regression model were compared, proving the feasibility of using the random die method for this type of problem. With the help of graphs, the metrics are demonstrated and the root mean square errors are derived. To determine the adequacy of the work of the developed neural network, testing was conducted to identify errors when compared with other markets В статті наведено матеріал стосовно аналізу фінансового ринку за допомогою алгоритму випадкового лісу. Розглянуто загальну проблему прогнозування фінансових ринків та роль сучасних технологій для точних прогнозів та автоматизації торгових стратегій. Проведений огляд існуючих моделей прогнозування та можливість їх застосування для фінансових ринків. Проаналізовані останні дослідження та публікації, на основі яких розроблено програму для проведення дослідження. Створена програма має модульну структуру та представляє собою бібліотеку, що може бути використана для подальшого дослідження. Була побудована та натренована нейрона мережа, яка за допомогою алгоритму випадкового лісу може робити аналіз за певний період та надавати прогнозування. В рамках дослідження були використані відкриті дані та проведений аналіз компанії Apple. В ході експериментів зроблені аналіз точності моделі під впливом гіперпараметрів, аналіз роботи моделі на різних ринкових умовах, порівняння з іншими методами прогнозування та аналіз впливу обсягу даних на точність моделі. Для прогнозування ринку було побудовано декілька математичних моделей нейронної мережі. Після чого вони були натреновані на обраних датасетах. Для тренування було взято інформацію за великий проміжок часу, дані за квартали, щоденний прибуток, прибуток за рік. Програмне забезпечення було написано на мові Python, використовувались ряд бібліотек, а саме yfinance, Sklearn-Scikit-learn, Matplotlib.pyplot, Pandas. В експериментальних дослідженнях було проведено порівняння результатів різних підходів до аналізу. Були порівняні моделі з використанням методу випадкового лісу та моделі лінійної регресії, що доводять доцільність використання методу випадкового лісу для такого роду задач. За допомогою графіків продемонстровані метрики та виведені середньоквадратичні помилки. Для визначення адекватності роботи розробленої нейронної мережі було проведено тестування на визначення помилок при порівнянні з іншими ринками |
| Document Type: | Article |
| File Description: | application/pdf |
| Language: | Ukrainian |
| ISSN: | 2225-6733 2519-271X |
| Access URL: | https://journals.uran.ua/vestnikpgtu_tech/article/view/299987 |
| Accession Number: | edsair.scientific.p..e52d574f6e8bb58d628b27a24cf62be0 |
| Database: | OpenAIRE |
| ISSN: | 22256733 2519271X |
|---|