-
Create categories for buy, hold and sell based on change in stock price.
-
Predict future change in stock price n days ahead. Based on:
-
Predicting the Direction of Stock Market Index Movement Using an Optimized Artificial Neural Network Model Technical Indicators from Table 2.
Experimental settings that are constant throughout the experiment:
- Objective: Predict future change in stock price n days ahead.
- Task type: Classification.
- Architecture: Feedforward.
- Input data: 3 stocks. E.g. [GOOG, IBM, AAPL]
- Output: One hot categorical prediction with threshold t+n time steps in the future.
- n = [1, 2, 3, 5, 8, 13, 21]
- Threshold [up_thr, down_thr]
If Output > up_thr: BUY Elif Output < down_thr: SELL Else HOLD
- Input data: 3 stocks. E.g. [GOOG, IBM, AAPL]
- Output: 3 output nodes. [[BUY(t+1), HOLD(t+1), SELL(t+1)], [BUY(t+2), HOLD(t+2), SELL(t+2)], ...,[BUY(t+n), HOLD(t+n), SELL(t+n)]]
- n = [1, 2, 3, 5, 8, 13, 21]
- Threshold [up_thr, down_thr]
If Output > up_thr: BUY Elif Output < down_thr: SELL Else HOLD
- categories = [[large pos, pos, no change, neg, large neg], [pos, no change, neg]]
- nr of input nodes
- weekdays: Yes/No
- On Balance Volume (OBV)
- Simple Moving Average (SMA)
- BIAS
- Psychological Line (PSY)
- ASY
- Input data: 3 stocks. [GOOG, IBM, AAPL]
- Output: One hot categorical prediction t+n time steps in the future.
- n = [1, 2, 3, 5, 8, 13, 21]
- categories = [[large pos, pos, no change, neg, large neg], [pos, no change, neg]]
- nr of input nodes
- weekdays: Yes/No
- On Balance Volume (OBV)
- Simple Moving Average (SMA)
- BIAS
- Psychological Line (PSY)
- ASY
- type of technical indicators
- nr of layers
- nr nodes in each layer
- dropout setting
- threshold values for output classes
- weight initialisation
- batch size
- Make sure to balance the number of outputs / category. Ideally they are equal.
Mean Average Percent Error (MAPE):
Backtest on Out-Of-Sample data only.
Performance metrics are:
- Total Returns
- Average Annual Return
- Maximum drawdown
- Sharpe ratio sharpe = (returns/std)*sqrt(365.25) std = std_dev(returns)
- Sortino ratio
Comparision Strategies:
- Buy&Hold
- Naive
- Trend following
https://github.com/Crypto-toolbox/pandas-technical-indicators/blob/master/technical_indicators.py