AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


Forecasting of Danish stocks prices using artificial neural networks: A study comparing forecasts from artificial neural networks with forecasts from autoregressive moving average models.

Translated title

Forecasting of Danish stocks prices using artificial neural networks

Authors

; ;

Term

4. term

Education

Publication year

2021

Abstract

Many economists view the stock market as efficient, meaning future prices cannot be reliably predicted. At the same time, growing computing power has made machine learning a common tool for finding patterns. This thesis examines whether artificial neural networks (ANNs) can forecast Danish stock prices one day ahead. The study analyzes six Danish stocks using daily data from 2010 to 2019. The first eight years are used to train and test the models, and the final year is held out for out-of-sample forecasting, i.e., predictions on data the models have not seen during training. Several architectures are tested: feedforward neural networks (FNN), recurrent neural networks (RNN), long short-term memory (LSTM), gated recurrent units (GRU), and bidirectional variants (bi-LSTM and bi-GRU). Each architecture is tried with and without additional explanatory variables beyond past prices. Traditional time-series models, ARIMA and ARIMAX, serve as baselines. Results show that the simpler FNN without extra variables is the most accurate among the ANN models in out-of-sample tests. However, for four of the six stocks, these forecasts are statistically less accurate than those from the ARIMA and ARIMAX models. Overall, the findings suggest that, in this setting, ANNs require further development before they are practical for forecasting Danish stock prices.

Mange økonomer beskriver aktiemarkedet som effektivt, hvilket indebærer, at fremtidige priser ikke kan forudsiges pålideligt. Samtidig gør øget regnekraft, at maskinlæring oftere bruges til at søge efter mønstre. Dette speciale undersøger, om kunstige neurale netværk (ANN) kan forudsige danske aktiekurser én dag frem. Analysen omfatter seks danske aktier med daglige data fra 2010 til 2019. De første otte år bruges til at træne og afprøve modellerne, mens det sidste år holdes udenfor til out-of-sample forudsigelser, dvs. forudsigelser på data, modellerne ikke har set under træning. Flere arkitekturer testes: feedforward-neurale netværk (FNN), rekurrente neurale netværk (RNN), long short-term memory (LSTM), gated recurrent units (GRU) samt bidirektionelle varianter (bi-LSTM og bi-GRU). Hver arkitektur afprøves både med og uden ekstra forklarende variable ud over tidligere priser. Som reference anvendes traditionelle tidsrække-modeller, ARIMA og ARIMAX. Resultaterne viser, at den enklere FNN uden ekstra variable er den mest præcise blandt ANN-modellerne i out-of-sample-test. Men for fire af de seks aktier er disse forudsigelser statistisk mindre præcise end forudsigelserne fra ARIMA- og ARIMAX-modellerne. Samlet peger resultaterne på, at ANN i denne sammenhæng kræver yderligere udvikling, før de kan blive et praktisk værktøj til at forudsige danske aktiekurser.

[This apstract has been rewritten with the help of AI based on the project's original abstract]