Power derivatives market trend prediction with machine learning and technical analysis
Liedes, Taneli (2023)
Liedes, Taneli
2023
Tieto- ja sähkötekniikan kandidaattiohjelma - Bachelor's Programme in Computing and Electrical Engineering
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2023-05-23
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202305306272
https://urn.fi/URN:NBN:fi:tuni-202305306272
Tiivistelmä
The objective of this thesis was to develop a machine learning model that predicts the short-term direction of power derivatives price by utilizing technical analysis. The use of machine learning in predicting the price and trend of various financial products has been studied widely. The developed machine learning model is based on the Gradient Boosting method, which is a popular machine learning method, which is one of the best models for multi-class classification tasks per studies. The data used was daily open, close, high, and low prices of the Nordic system price future from timespan 27.11.2017-3.4.2023. The source of the data was Nasdaq OMX Commodities.
The model was developed in Python, using LightGBM as framework. The model predicts the trend of derivatives in the selected timespan. The lengths of the tested timespans ranged from two to eight days, but this is not of essential importance in terms of the model's operation, longer timespans could also be used. The model predicts the trend on a five-step scale named as follows; strong sell, sell, hold, buy and strong buy. It was trained in such a way that a class was assigned for each day in the training data, based on how much the price increased or decreased during the selected timespan. The highest and lowest price of each day in the timespan were used as a benchmark for the closing price of that day. The thresholds which determine the class are parameters of the model, the magnitude of which is easy to modify.
The results were not particularly good, but still better than a random number generator. The naive model, which predicted the same trend as the previous day, achieved similar results to the developed machine learning model. The indicators based on technical analysis also did not affect the predictions made by the model significantly, contrary to what was assumed. On the other hand, there was a limited amount of data available, increasing the amount of training data might improve the accuracy of the model. The model needs to be further developed so that it could be used as a proper aid in trading power derivatives.
The model was developed in Python, using LightGBM as framework. The model predicts the trend of derivatives in the selected timespan. The lengths of the tested timespans ranged from two to eight days, but this is not of essential importance in terms of the model's operation, longer timespans could also be used. The model predicts the trend on a five-step scale named as follows; strong sell, sell, hold, buy and strong buy. It was trained in such a way that a class was assigned for each day in the training data, based on how much the price increased or decreased during the selected timespan. The highest and lowest price of each day in the timespan were used as a benchmark for the closing price of that day. The thresholds which determine the class are parameters of the model, the magnitude of which is easy to modify.
The results were not particularly good, but still better than a random number generator. The naive model, which predicted the same trend as the previous day, achieved similar results to the developed machine learning model. The indicators based on technical analysis also did not affect the predictions made by the model significantly, contrary to what was assumed. On the other hand, there was a limited amount of data available, increasing the amount of training data might improve the accuracy of the model. The model needs to be further developed so that it could be used as a proper aid in trading power derivatives.
Kokoelmat
- Kandidaatintutkielmat [8453]