ed4dc8fcf2a87191f30cecaff5361ba9.ppt
- Количество слайдов: 25
DOCTORAL SCHOOL OF FINANCE AND BANKING DOFIN ACADEMY OF ECONOMIC STUDIES Forecasting the BET-C Stock Index with Artificial Neural Networks MSc Student: Stoica Ioan-Andrei Supervisor: Professor Moisa Altar July 2006
Stock Markets and Prediction n n Predicting stock prices - goal of every investor trying to achieve profit on the stock market predictability of the market - issue that has been discussed by a lot of researchers and academics n n Efficient Market Hypothesis - Eugene Fama three forms: n Weak: future stock prices can’t be predicted using past stock prices n Semi-strong: even published information can’t be used to predict future prices n Strong: market can’t be predicted no matter what information is available
Stock Markets and Prediction n Technical Analysis n ‘castles-in-the air’ n investors behavior and reactions according to these anticipations Fundamental Analysis n ‘firm foundations’ n stocks have an intrinsic value determined by present conditions and future prospects of the company Traditional Time Series Analysis n uses historic data attempting to approximate future values of a time series as a linear combination n Machine Learning - Artificial Neural Networks
The Artificial Neural Network n n computational technique that benefits from techniques similar to those employed in the human brain 1943 - W. S. Mc. Culloch and W. Pitts attempted to mimic the ability of the human brain to process data and information and comprehend patterns and dependencies The human brain - a complex, nonlinear and parallel computer The neurons: n elementary information processing units n building blocks of a neural network
The Artificial Neural Network n n n semi-parametric approximation method Advantages: n ability to detect nonlinear dependencies n parsimonious compared to polynomial expansions n generalization ability and robustness n no assumptions of the model have to be made n flexibility Disadvantages: n has the ‘black box’ property n training requires an experienced user n n n training takes a lot of time, fast computer needed overtraining overfitting undertraining underfitting
The Artificial Neural Network
The Artificial Neural Network
The Artificial Neural Network Overtraining/Overfitting
The Artificial Neural Network Undertraining/Underfitting
Architecture of the Neural Network n Types of layers: n input layer: number of neurons = number of inputs n output layer: number of neurons = number of outputs n hidden layer(s): number of neurons = trial and error n Connections between neurons: n fully connected n partially connected The activation function: n threshold function n piecewise linear function n sigmoid functions n
The feed forward network m = number of hidden layer neurons n = number of inputs
The Feed forward Network with Jump Connections
The Recurrent Neural Network - Elman allows the neurons to depend on their own lagged values building ‘memory’ in their evolution
Training the Neural Network Objective: minimizing the discrepancy between real data and the output of the network Ω - the set of parameters Ψ – loss function Ψ nonlinear optimization problem - backpropagation - genetic algorithm
The Backpropagation Algorithm n n alternative to quasi-Newton gradient descent Ω 0 – randomly generated n ρ – learning parameter, in [. 05, . 5] after n iterations: μ=0. 9, momentum parameter n problem: local minimum points n
The Genetic Algorithm n n n n based on Darwinian laws Population Creation: N random vectors of weights Selection (Ωi Ωj) parent vectors Crossover & Mutation C 1, C 2 children vectors Election Tournament: the fittest 2 vectors passed to the next generation Convergence: G* generations G* - large enough so there are no significant changes in the fitness of the best individual for several generations
Experiments and Results Data n BET-C stock index – daily closing prices, 16 April 1998 until 18 May 2006 daily returns: n conditional volatility - rolling 20 -day standard deviation: n BDS-Test for nonlinear dependencies: n H 0: i. i. d. data n BDSm, ε~N(0, 1) n Series m=2 m=3 m=4 ε=1 ε=1. 5 OD 16. 6526 17. 6970 18. 5436 18. 7202 19. 7849 19. 0588 ARF 16. 2626 17. 2148 18. 3803 18. 4839 19. 7618 18. 9595
Experiments and Results n n n 3 types of Ann's: n feed-forward network with jump connections n recurrent network Input: [Rt-1 Rt-2 Rt-3 Rt-4 Rt-5] & Vt Output: next-day-return Rt Training: genetic algorithm & backpropagation Data divided in: n n training set – 90% test set – 10% one-day-ahead forecasts - static forecasting Network: n n n trained 100 times best 10 – SSE best 1 - RMSE
Experiments and Results Evaluation Criteria n In-sample Criteria n Out-of-sample Criteria n Pesaran-Timmerman Test for Directional Accuracy: n H 0 : signs of the forecast and those of the real data are independent n DA~N(0, 1)
Experiments and Results ROI - trading strategy based on the sign forecasts: n n + buy sign - sell sign Finite differences: n n Benchmarks n n n Naïve model: Rt+1=Rt buy-and-hold strategy AR(1) model – LS – overfitting: n n RMSE MAE
Experiments and Results Naïve AR(1) FFN – no vol FFN-jump RN R 2 - 0. 079257 0. 083252 0. 083755 0. 084827 0. 091762 SSE - 0. 332702 0. 331258 0. 331077 0. 330689 0. 328183 RMSE 0. 015100 0. 011344 0. 011325 0. 011304 0. 011332 0. 011319 MAE 0. 011948 0. 008932 0. 008929 0. 008873 0. 008867 0. 008892 HR 55. 77% (111) 56. 78% (113) 57. 79% (115) 59. 79% (119) ROI 0. 265271 0. 255605 0. 318374 0. 351890 0. 331464 0. 412183 RP 15. 02% 14. 47% 18. 02% 19. 92% 18. 77% 23. 34% PT-Test - - 14. 79 15. 01 14. 49 B&H 0. 2753 FFN Volatility -0. 1123 FFN-jump -0. 1358 RN -0. 1841
Experiments and Results Actual, fitted ( training sample)
Experiments and Results Actual, fitted ( test sample)
Conclusions n n n RMSE and MAE < AR(1) no signs of overfitting R 2 < 0. 1 forecasting magnitude is a failure sign forecasting ~60% success Volatility: n improves sign forecast n finite differences negative correlation n perceived as measure of risk trading strategy: outperforms naïve model and buy-and-hold quality of the sign forecast – confirmed by Pesaran-Timmerman test
Further development n n n Volatility: other estimates neural classificator: specialized in sign forecasting using data outside the Bucharest Stock Exchange: n T-Bond yields n exchange rates n indexes from foreign capital markets
ed4dc8fcf2a87191f30cecaff5361ba9.ppt