Figure 1.

Figure 2.

Figure A1.

Figure A2.

MAE results for Apple and Amazon closing prices with LSTM approaches (test dataset)
| Full period | First half of 2016 | First half of 2017 | ||||
|---|---|---|---|---|---|---|
| Indicators | AAPL | AMZN | AAPL | AMZN | AAPL | AMZN |
| Base model | 131839949 | 179258627 | 176138673 | 274137855 | 173356700 | 252350198 |
| Fear | 125483563 | 180665696 | 164580851 | 246518980 | 211031605 | 302579474 |
| Anger | 125998230 | 188602498 | 172433139 | 249338907 | 171247523 | 273984994 |
| negative VADER | 128457127 | 183451424 | 180822334 | 279399172 | 176222412 | 229997950 |
| negative NRC | 129982302 | 181365827 | 173876262 | 256298833 | 174086104 | 208780619 |
| Neutral VADER | 126443868 | 186080492 | 180506883 | 256098881 | 239225325 | 256152057 |
| Positive NRC | 132827363 | 180629995 | 176500689 | 271267606 | 193072633 | 188347131 |
| positive VADER | 133481260 | 183951456 | 190247008 | 241919926 | 149474564 | 199168532 |
| Sadness | 133854686 | 181299519 | 186525792 | 259533810 | 176089131 | 209214699 |
| Twitter volume | 128999042 | 186141427 | 204244861 | 263932412 | 166108240 | 25818537 |
| ML_positive | 124848073 | 180946633 | 184088680 | 255719195 | 169194595 | 18691250 |
| ML_negative | 127055620 | 178378199 | 181395180 | 230176491 | 1847151434 | 195771334 |
Results of the Granger causality analysis for Apple trading volume variable
| Granger causality | ||||
|---|---|---|---|---|
| Time period | Model | Twitter variable | Twitter -> Volume | Volume -> Twitter |
| full period | VAR(5) | Twitter volume | * | * |
| VAR(6) | negative VADER | * | ||
| VAR(5) | positive VADER | * | ||
| first half of 2016 | VAR(2) | negative VADER | * | |
| VAR(2) | Twitter volume | * | ||
| VAR(2) | Fear | * | ||
| VAR(3) | negative NRC | * | ||
| VAR (3) | positive NRC | * | ||
| VAR(2) | neutral VADER | * | ||
| VAR(2) | positive VADER | * | ||
| VAR(2) | positive ML | * | ||
| VAR(2) | negative ML | * | ||
| first half of 2017 | VAR(2) | negative VADER | * | * |
| VAR(1) | negative NRC | * | ||
| VAR(4) | neutral VADER | * | * | |
| VAR(1) | Anger | * | ||
| VAR(1) | positive VADER | * | ||
| VAR(2) | negative ML | * | * | |
| VAR(2) | positive ML | * | * | |
Descriptive statistics of affective indicators (2016–2017)
| Indicator | Mean | Minimum | Maximum | Standard Deviation | Coefficient of Variation |
|---|---|---|---|---|---|
| Apple | |||||
| Anger | 14,83 | 0 | 129 | 16,59 | 111 % |
| positive (NRC) | 2,94 | 0 | 56 | 4,37 | 149 % |
| Fear | 20,96 | 0 | 188 | 24,62 | 117 % |
| negative (NRC) | 54,02 | 1 | 692 | 56,11 | 104 % |
| Sadness | 12,89 | 0 | 426 | 21,60 | 167 % |
| negative (VADER) | 170,29 | 10 | 1401,0 | 157,91 | 93 % |
| positive (VADER) | 353,52 | 18 | 1789,0 | 230,66 | 65 % |
| neutral (VADER) | 558,32 | 31 | 3771 | 415,12 | 74 % |
| negative machine learning | 499,15 | 30 | 2593 | 326,07 | 65% |
| positive machine learning | 863,99 | 35 | 4086 | 495,20 | 57% |
| Amazon | |||||
| Anger | 5,02 | 0 | 65 | 5,90 | 118 % |
| positive (NRC) | 76,27 | 0 | 784 | 50,38 | 67 % |
| Fear | 11,18 | 0 | 104 | 8,65 | 77 % |
| negative (NRC) | 30,40 | 0 | 282 | 22,49 | 74 % |
| Sadness | 6,22 | 0 | 71 | 6,48 | 104 % |
| negative (VADER) | 96,43 | 0 | 805 | 64,10 | 66 % |
| positive (VADER) | 284,50 | 0 | 2427 | 177,23 | 63 % |
| neutral (VADER) | 296,92 | 0 | 1856 | 143,89 | 48 % |
| Positive machine learning | 453,88 | 0 | 3531 | 259,43 | 57 % |
| Negative machine learning | 228,07 | 0 | 1647 | 132,99 | 58 % |
Information criteria AIC, BIC, and HQC for Amazon in the period 01/01/2016–31/12/2017
| Variable | AIC | BIC | HQC |
|---|---|---|---|
| volume - Twitter | 7 | 3 | 5 |
| negative (VADER) | 7 | 3 | 4 |
| fear (NRC) | 7 | 4 | 5 |
| negative (NRC) | 7 | 3 | 5 |
| positive (NRC) | 7 | 3 | 5 |
| Sadness (NRC) | 7 | 4 | 7 |
| neutral (VADER) | 5 | 2 | 3 |
| positive (VADER) | 7 | 3 | 7 |
| anger (NRC) | 9 | 5 | 7 |
| positive (machine learning) | 7 | 3 | 5 |
| negative (machine learning) | 7 | 3 | 5 |
Results of the Granger causality analysis for the Amazon trading volume variable
| Granger causality | ||||
|---|---|---|---|---|
| Time period | Model | Twitter variable | Twitter -> Volume | Volume -> Twitter |
| Full period | VAR(2) | neutral VADER | * | |
| VAR(3) | negative ML | * | * | |
| First half of 2016 | VAR(2) | Twitter Volume | * | |
| VAR(2) | Negative VADER | * | ||
| VAR(2) | Fear | * | ||
| VAR(2) | positive NRC | * | ||
| VAR(2) | neutral VADER | * | ||
| VAR(2) | positive VADER | * | ||
| VAR(4) | Anger | * | ||
| VAR(2) | negative ML | * | ||
| VAR(2) | negative ML | * | ||
| First half of 2017 | VAR(3) | Anger | * | * |
Information criteria AIC, BIC, and HQC for Apple in the period 01/01/2016–30/12/2017
| Variable | AIC | BIC | HQC |
|---|---|---|---|
| volume - Twitter | 8 | 4 | 4 |
| negative (VADER) | 6 | 4 | 4 |
| fear (NRC) | 7 | 3 | 7 |
| negative (NRC) | 6 | 4 | 4 |
| positive (NRC) | 7 | 4 | 6 |
| Sadness (NRC) | 6 | 3 | 6 |
| neutral (VADER) | 7 | 4 | 6 |
| positive (VADER) | 7 | 4 | 6 |
| anger (NRC) | 9 | 5 | 6 |
| positive (machine learning) | 8 | 5 | 6 |
| negative (machine learning) | 7 | 5 | 5 |
ADF and KPSS test results for trading volume and the set of Twitter-related explanatory variables for Amazon in the period 01/01/2016–31/12/2017
| Variable | ADF test (H0: unit root exists, a=1; process is; proces I(1); α=5%) | KPSS test (H0: the process is stationary) | |||
|---|---|---|---|---|---|
| Augmentation | Test statistic | p-value | Augmentation | Test statistic | |
| anger (NRC) | Levels of the variable | −3,65442 | 0,004827 | 2,02218 | 0,462 |
| First differences of the variable | −9,53803 | 9,85e-18 | 0,00866198 | 0,462 | |
| fear (NRC) | Levels of the variable | −6,11781 | 6,205e-08 | 1,67969 | 0,462 |
| First differences of the variable | −14,2471 | 7,032e-33 | 0,0111678 | 0,462 | |
| negative (NRC) | Levels of the variable | −6,35963 | 1,558e-08 | 2,12338 | 0,462 |
| First differences of the variable | −9,1027 | 2,291e-16 | 0,0112555 | 0,462 | |
| positive (NRC) | Levels of the variable | −6,93493 | 4,954e-10 | 2,31123 | 0,462 |
| First differences of the variable | −10,0592 | 2,144e-19 | 0,00856802 | 0,462 | |
| Sadness (NRC) | Levels of the variable | −7,34949 | 3,634e-11 | 1,82555 | 0,462 |
| First differences of the variable | −8,82186 | 1,694e-15 | 0,0097475 | 0,462 | |
| volume - Twitter | Levels of the variable | −7,26547 | 6,221e-11 | 1,48181 | 0,462 |
| First differences of the variable | −10,0402 | 2,467e-19 | 0,00921894 | 0,462 | |
| volume | Levels of the variable | −7,95235 | 6,891e-13 | 0,932306 | 0,462 |
| First differences of the variable | −10,6211 | 3,279e-21 | 0,0237538 | 0,462 | |
| negative (VADER) | Levels of the variable | −7,0515 | 2,401e-10 | 1,0782 | 0,462 |
| First differences of the variable | −9,29976 | 5,549e-17 | 0,00935709 | 0,462 | |
| neutral (VADER) | Levels of the variable | −10,1264 | 1,304e-19 | 0,233814 | 0,462 |
| First differences of the variable | |||||
| positive (VADER) | Levels of the variable | −6,5758 | 4,375e-09 | 2,66892 | 0,462 |
| First differences of the variable | −10,1442 | 1,143e-19 | 0,00896029 | 0,462 | |
| positive (machine learning) | Levels of the variable | −9,58592 | 6,946e-18 | 1,36072 | 0,462 |
| First differences of the variable | −10,0351 | 2,562e-19 | 0,00883801 | 0,462 | |
| negative (machine learning) | Levels of the variable | −5,90414 | 2,03e-07 | 1,54254 | 0,462 |
| First differences of the variable | −9,68659 | 3,328e-18 | 0,0110951 | 0,462 | |
MAE results for the Apple and Amazon volume from VAR and LSTM approaches (test dataset)
| Volume Apple | Volume Amazon | |||
|---|---|---|---|---|
| first half of 2016 | ||||
| VAR | LSTM | VAR | LSTM | |
| basic model | 52084210,079 | 30415580,280 | ||
| Fear | 6475000 | 43234472,137 | 1710000 | 29134831,193 |
| Anger | 44926837,853 | 2333900 | 27106026,803 | |
| negative VADER | 48940743,521 | 1302400 | 28507242,885 | |
| negative NRC | 11669000 | 47438402,462 | 27761003,405 | |
| neutral VADER | 7935700 | 47392150,783 | 110190 | 31538788,185 |
| positive NRC | 5272400 | 46575716,841 | 1771500 | 30197920,410 |
| positive VADER | 46123079,248 | 219890 | 31073486,591 | |
| Sadness | 45630371,911 | 27609196,773 | ||
| Twitter volume | 7894500 | 45452760,479 | 2821900 | 29480840,315 |
| ML positive | 5065700 | 48447840,465 | 201980 | 28161706,284 |
| ML negative | 6480200 | 45159658,721 | 748240 | 29443364,882 |
| first half of 2017 | ||||
| basic model | 29959620,193 | 19816644,131 | ||
| Fear | 30032320,014 | 19610157,993 | ||
| Anger | 27606000 | 29989363,986 | 9409900 | 19193604,890 |
| negative VADER | 29061000 | 29164579,531 | 19828186,097 | |
| negative NRC | 26228000 | 29378243,531 | 19651018,103 | |
| Neutral VADER | 28722000 | 29543515,048 | 19624056,441 | |
| Positive NRC | 27437000 | 29435291,269 | 19873546,559 | |
| positive VADER | 29880000 | 29613845,434 | 19708110,731 | |
| Sadness | 29202756,331 | 19887700,586 | ||
| Twitter volume | 27795000 | 29200650,234 | 19666939,683 | |
| ML positive | 28905000 | 29288276,166 | 19862915,138 | |
| ML negative | 29480424,662 | 20186129,690 | ||
| full period | ||||
| basic model | 37060274,722 | 49244981,060 | ||
| Fear | 36283377,928 | 22495202,131 | ||
| Anger | 37418912,444 | 22924401,013 | ||
| negative VADER | 37068676,291 | 22832473,868 | ||
| negative NRC | 37277158,450 | 22121621,013 | ||
| Neutral VADER | 36841175,338 | 8603500 | 23183559,170 | |
| Positive NRC | 37187736,091 | 22731837,658 | ||
| positive VADER | 6703500 | 38351343,147 | 22735923,064 | |
| Sadness | 36132565,891 | 22154059,560 | ||
| Twitter volume | 36132565,891 | 22725973,268 | ||
| ML positive | 36672397,669 | 22310880,027 | ||
| ML negative | 35741492,741 | 9708500 | 22808249,226 | |
ADF and KPSS test results for trading volume and the set of Twitter-related explanatory variables for Apple in the period 01/01/2016–31/12/2017
| Variable | ADF test (H0: unit root exists, a=1; process is; proces I(1); α=5%) | KPSS test (H0: the process is stationary) | |||
|---|---|---|---|---|---|
| Augmentation | Test statistic | Augmentation | Test statistic | Augmentation | |
| anger (NRC) | Levels of the variable | −3,27612 | 0,01601 | 3,00692 | 0,462 |
| First differences of the variable | −11,99 | 1,125e-25 | 0,0161847 | 0,462 | |
| fear (NRC) | Levels of the variable | −3,97906 | 0,001528 | 2,54575 | 0,462 |
| First differences of the variable | −11,3597 | 1,285e-23 | 0,0179549 | 0,462 | |
| negative (NRC) | Levels of the variable | −4,12856 | 0,0008677 | 2,18129 | 0,462 |
| First differences of the variable | −8,08676 | 2,779e-13 | 0,0146701 | 0,462 | |
| positive (NRC) | Levels of the variable | −5,91842 | 1,878e-07 | 1,80831 | 0,462 |
| First differences of the variable | −8,46602 | 2,054e-14 | 0,0106107 | 0,462 | |
| Sadness (NRC) | Levels of the variable | −5,45164 | 2,222e-06 | 1,15178 | 0,462 |
| First differences of the variable | −10,7283 | 1,47e-21 | 0,0104196 | 0,462 | |
| volume - Twitter | Levels of the variable | 5,40184 | 2,727e-05 | 0,176054 | 0,462 |
| First differences of the variable | −9,62749 | 5,127e-18 | 0,0134742 | 0,462 | |
| volume | Levels of the variable | −5,26013 | 5,816e-06 | 2,54196 | 0,462 |
| First differences of the variable | −8,23407 | 1,018e-13 | 0,00808336 | 0,462 | |
| negative (VADER) | Levels of the variable | −3,84941 | 0,002452 | 3,24397 | 0,462 |
| First differences of the variable | −11,0965 | 9,295e-23 | 0,0172141 | 0,462 | |
| neutral (VADER) | Levels of the variable | −5,28912 | 5,038e-06 | 2,74717 | 0,462 |
| First differences of the variable | −3,16272 | 2,13e-18 | 0,0160322 | 0,452 | |
| positive (VADER) | Levels of the variable | −6,42807 | 1,046e-08 | 0,976474 | 0,462 |
| First differences of the variable | −11,4848 | 5,016e-24 | 0,0120437 | 0,462 | |
| positive (machine learning) | Levels of the variable | −5,87552 | 2,374e-07 | 2,07179 | 0,462 |
| First differences of the variable | −9,84191 | 1,064e-18 | 0,00813973 | 0,462 | |
| negative (machine learning) | Levels of the variable | 5,707e-06 | −5,26396 | 2,95298 | 0,462 |
| First differences of the variable | −11,0991 | 9,114e-23 | 0,00850337 | 0,462 | |
Pearson linear correlation coefficients for sentiment across different research periods (variable: volume)
| Indicator | AAPL | AMZN | AAPL | AMZN | AAPL | AMZN |
|---|---|---|---|---|---|---|
| full period | first half of 2016 | first half of 2017 | ||||
| critical value (5%, two tail) | 0,086 | 0,086 | 0,172 | 0,173 | 0,174 | 0,174 |
| Fear | 0,22 | 0,38 | 0,00 | 0,44 | 0,30 | 0,54 |
| Anger | 0,21 | 0,00 | 0,11 | 0,05 | 0,30 | 0,15 |
| negative VADER | 0,57 | 0,50 | 0,38 | 0,46 | 0,50 | 0,71 |
| negative NRC | 0,49 | 0,51 | 0,31 | 0,65 | 0,40 | 0,73 |
| neutral VADER | 0,56 | 0,57 | 0,29 | 0,41 | 0,50 | 0,77 |
| positive NRC | 0,40 | 0,30 | 0,26 | 0,29 | 0,40 | 0,59 |
| positive VADER | 0,56 | 0,44 | 0,36 | 0,46 | 0,60 | 0,70 |
| Sadness | 0,29 | 0,40 | 0,37 | 0,53 | 0,30 | 0,52 |
| Volume | 0,54 | 0,52 | 0,36 | 0,46 | 0,50 | 0,74 |
| Machine learning_positive | 0,53 | 0,48 | 0,14 | 0,38 | 0,40 | 0,72 |
| Machine learning_negative | 0,52 | 0,55 | 0,16 | 0,53 | 0,30 | 0,74 |
