| Literature DB >> 24790586 |
Shangkun Deng1, Takashi Mitsubuchi1, Akito Sakurai1.
Abstract
Predicting stock price change rates for providing valuable information to investors is a challenging task. Individual participants may express their opinions in social network service (SNS) before or after their transactions in the market; we hypothesize that stock price change rate is better predicted by a function of social network service activities and technical indicators than by a function of just stock market activities. The hypothesis is tested by accuracy of predictions as well as performance of simulated trading because success or failure of prediction is better measured by profits or losses the investors gain or suffer. In this paper, we propose a hybrid model that combines multiple kernel learning (MKL) and genetic algorithm (GA). MKL is adopted to optimize the stock price change rate prediction models that are expressed in a multiple kernel linear function of different types of features extracted from different sources. GA is used to optimize the trading rules used in the simulated trading by fusing the return predictions and values of three well-known overbought and oversold technical indicators. Accumulated return and Sharpe ratio were used to test the goodness of performance of the simulated trading. Experimental results show that our proposed model performed better than other models including ones using state of the art techniques.Entities:
Mesh:
Year: 2014 PMID: 24790586 PMCID: PMC3984866 DOI: 10.1155/2014/861641
Source DB: PubMed Journal: ScientificWorldJournal ISSN: 1537-744X
List of technical indicators used in this research.
| Indicator | Mathematical formula | Parameters |
|---|---|---|
| Simple moving average (SMA) |
|
|
|
| ||
| Exponential moving average (EMA) | EMAn( | Usually |
|
| ||
| Rate of change (ROC) |
| |
|
| ||
| Moving average convergence and divergence (MACD) | MACD( | |
|
| ||
| BIAS (bias ratio) |
|
|
|
| ||
| WPR (Williams % |
|
|
|
| ||
| RSI (relative strength index) |
|
|
List of features from historical traded prices and volumes.
| Number | Features based on historical prices and volumes |
|---|---|
| 1 | ROC for historical prices |
| 2 | ROC for historical transaction volumes |
| 3 | SMA for historical prices |
| 4 | SMA for historical transaction volumes |
| 5 | MACD for historical prices |
| 6 | MACD signal for historical prices |
List of numerical features of news items.
| Number | Numerical features based on news | Calculation |
|---|---|---|
| 1 | Frequency of news |
|
| 2 | SMA of frequency of news |
|
List of features based on user comments.
| Number | Features based on user comments | Calculation |
|---|---|---|
| 1 | Frequency of user comments |
|
|
| ||
| 2 | SMA of frequency of user comments |
|
|
| ||
| 3 | Average and standard deviation of comment length |
|
Figure 1Diagram of the proposed model.
Trading rule design of proposed model.
| Trading rule | Rule in detail |
|---|---|
| Proposed model | If TDV > |
| else if TDV < | |
| else (i.e., |
Features from stock prices and volumes.
| Number | Indicator | On | Description |
|---|---|---|---|
| 1 | ROC | Closing price | ROC for historical prices from day ( |
| 2 | ROC | Volume | ROC for historical volumes from day ( |
| 3 | SMA | Closing price | SMA for historical prices from day ( |
| 4 | SMA | Volume | SMA for historical volumes from day ( |
| 5 | MACD | Closing price | MACD for historical prices from day ( |
| 6 | MACD signal | Closing price | MACD signal for historical prices from day ( |
Features from news dynamics and user comment dynamics.
| Number | Feature | On | Description |
|---|---|---|---|
| 1 | Frequency | News | Frequency of news from ( |
| 2 | SMA | News | SMA of news from ( |
| 3 | Frequency | User comments | Frequency of user comments from ( |
| 4 | SMA | User comments | SMA of user comments from ( |
| 5 | MA/standard deviation | User comments | Average and standard deviation of comment length from ( |
Chromosome design of the GA model.
| Number | Length | Value range | Meaning |
|---|---|---|---|
| 1 | 5 bits | −1 to 1 | RSI weight |
| 2 | 5 bits | −1 to 1 | WPR weight |
| 3 | 5 bits | −1 to 1 | BIAS weight |
| 4 | 5 bits | −1 to 1 | MKR weight |
| 5 | 5 bits | −1 to 1 | Threshold value for buying |
| 6 | 5 bits | −1 to 1 | Threshold value for selling |
| 7 | 4 bits | 2 to 17 | Parameter of RSI |
| 8 | 4 bits | 2 to 17 | Parameter of WPR |
| 9 | 4 bits | 2 to 17 | Parameter of BIAS |
Training and testing period.
| Period | Process | Length of period |
|---|---|---|
| A | MKR training | 240 trading days (around 12 months) |
|
| ||
| B | MKR testing (prediction) | 160 trading days (around 8 months) |
|
| ||
| C | GA training | 80 trading days (around 4 months) |
|
| ||
| D | GA testing (trading) | 80 trading days (around 4 months) |
Figure 2Rolling window method for training and forecasting (for example, 1-A means Period A (see Table 9) in 1st period).
A list of models for stock change prediction and trading signal generation.
| Model | change rate prediction | Trading signal generation | Description | ||
|---|---|---|---|---|---|
| Features | Learning method | Features | Learning method | ||
| MKR-all-GA (proposed) | News/comments/historical data | Multiple kernel (MKR) | Prediction/RSI/WPR/BIAS | GA | Integration of MKR and GA. Three feature sets are used in MKR |
| SVR-ts-GA | Historical data | Single kernel (SVR) | Prediction/RSI/WPR/BIAS | GA | Integration of SVR and GA. Stock prices and transaction volumes are used in SVR |
| SVR-news-GA | News | Single kernel (SVR) | Prediction/RSI/WPR/BIAS | GA | Integration of SVR and GA. Features from news are used in SVR |
| SVR-coms-GA | User comments | Single kernel (SVR) | Prediction/RSI/WPR/BIAS | GA | Integration of SVR and GA. Features from user comments are used in SVR |
| SVR-all-GA | News/comments/historical data | Single kernel (SVR) | Prediction/RSI/WPR/BIAS | GA | Integration of SVR and GA. Three feature sets are used in SVR |
| SVR-ts-STS | Historical data | Single kernel (SVR) | No learning; sign function | SVR and a simple trading strategy. Features from stock prices and transaction volumes are used in SVR | |
| SVR-news-STS | News | Single kernel (SVR) | No learning; sign function | SVR and a simple trading strategy. Features from news are used in SVR | |
| SVR-coms-STS | User comments | Single kernel (SVR) | No learning; sign function | SVR and a simple trading strategy. Features from user comments are used in SVR | |
| SVR-all-STS | News/comments/historical data | Single kernel (SVR) | No learning; sign function | SVR and a simple trading strategy. Three feature sets are used in SVR | |
| MKR-all-STS | News/comments/historical data | Multiple kernel (MKR) | No learning; sign function | MKR and a simple trading strategy. Three feature sets are used in MKR | |
| ANN-all-STS | News/comments/historical data | Artificial neural network (ANN) | No learning; sign function | ANN and a simple trading strategy. Three feature sets are used in ANN | |
| Buy and Hold | — | No learning | No learning | Buy and then hold the position, until the end of the testing period | |
| Sell and Hold* | — | No learning | No learning | Sell and then hold the position, until the end of the testing period | |
*Note for “Sell and Hold,” we do margin transaction.
Summary of evaluation measures.
| Evaluation measure | Calculation | Description |
|---|---|---|
| RMSE |
| PC(i) is the predicted price change rate of target stock at time |
|
| ||
| Accumulated return |
|
|
|
| ||
| Sharpe ratio |
|
|
Average of RMSEs in the five out-of-sample testing periods for three-stock price changes.
| Models | Sharp | Amazon | Sony |
|---|---|---|---|
| SVR-ts | 0.04756 | 0.03295 | 0.03212 |
| SVR-news | 0.03890 | 0.02029 | 0.02124 |
| SVR-coms | 0.03984 | 0.02251 | 0.02560 |
| SVR-all | 0.04075 | 0.02307 | 0.02371 |
| MKR-all | 0.03117 | 0.01729 | 0.01873 |
Average returns in the five out-of-sample testing periods (of four months each) in the ratio of the initial investment.
| Models | Sharp | Amazon | Sony |
|---|---|---|---|
| MKR-all-GA (proposed) | 0.02143 | 0.14811 | 0.03797 |
| SVR-ts-GA | 0.01307 | 0.12478 | −0.01702 |
| SVR-news-GA | 0.01425 | 0.08226 | −0.02630 |
| SVR-coms-GA | 0.01343 | 0.13386 | 0.00116 |
| SVR-all-GA | 0.01358 | 0.02097 | −0.02479 |
| SVR-ts-STS | 0.00399 | −0.00258 | −0.07979 |
| SVR-news-STS | 0.02224 | −0.12041 | −0.03325 |
| SVR-coms-STS | 0.16217 | 0.13640 | −0.07926 |
| SVR-all-STS | 0.04633 | −0.13022 | −0.09349 |
| MKR-all-STS | −0.03845 | −0.25684 | 0.01630 |
| ANN-all-STS | −0.01677 | 0.17738 | 0.02611 |
| Buy and Hold | −0.03205 | 0.15849 | 0.00543 |
| Sell and Hold | 0.03205 | −0.15849 | −0.00544 |
Sharpe ratios in the five testing data sets for the three-stock trading.
| Models | Sharp | Amazon | Sony |
|---|---|---|---|
| MKR-all-GA (proposed) | 0.23395 | 0.38152 | 0.23676 |
| SVR-ts-GA | −0.04203 | 0.26138 | −0.28590 |
| SVR-news-GA | 0.15631 | 0.18533 | −0.19119 |
| SVR-coms-GA | 0.10704 | 0.34027 | 0.00716 |
| SVR-all-GA | 0.13337 | 0.21494 | −0.18474 |
| SVR-ts-STS | −0.11036 | −0.10034 | −1.06153 |
| SVR-news-STS | 0.09233 | −0.69485 | −0.19220 |
| SVR-coms-STS | 0.75930 | 0.23981 | −0.45355 |
| SVR-all-STS | 0.47225 | −0.48811 | −0.98314 |
| MKR-all-STS | −0.25124 | −1.19644 | 0.08685 |
| ANN-all-STS | −0.10232 | 0.56225 | 0.14567 |
| Buy and Hold | −0.24035 | 0.41475 | 0.02929 |
| Sell and Hold | 0.24035 | −0.41476 | −0.02929 |