APT application on Apple, MSFT, INTC Stock
Dataset
/bin/bash: -c: line 0: syntax error near unexpected token `'ignore''
/bin/bash: -c: line 0: `warnings.filterwarnings('ignore')'
[*********************100%***********************] 3 of 3 completed
2012-01-01 00:00:00
18.252399444580078
20.153919219970703
2012-04-01 00:00:00
17.779001235961914
19.252975463867188
2012-07-01 00:00:00
20.308860778808594
16.489116668701172
2012-10-01 00:00:00
16.270668029785156
15.136100769042969
2013-01-01 00:00:00
13.595793724060059
16.19683837890625
2012-01-01 00:00:00
21.412500381469727
28.1200008392334
2012-04-01 00:00:00
20.85714340209961
26.649999618530273
2012-07-01 00:00:00
23.825000762939453
22.65999984741211
2012-10-01 00:00:00
19.006071090698242
20.6200008392334
2013-01-01 00:00:00
15.809286117553711
21.84000015258789
2013-04-01 00:00:00
14.161786079406738
24.229999542236328
2013-07-01 00:00:00
17.02678680419922
22.920000076293945
2013-10-01 00:00:00
20.036428451538086
25.959999084472656
2014-01-01 00:00:00
19.169286727905273
25.809999465942383
2014-04-01 00:00:00
23.232500076293945
30.899999618530273
count
32.0
32.0
mean
32.35193094611168
35.91500002145767
std
13.747597193055293
10.615415412821108
min
14.161786079406738
20.6200008392334
25%
22.77750015258789
27.752500534057617
50%
27.928750038146973
34.095001220703125
75%
40.062500953674316
46.35249996185303
max
73.4124984741211
59.849998474121094
2012-04-01 00:00:00
-0.0259361106585535
-0.05227600202102978
2012-07-01 00:00:00
0.1422945272812901
-0.14971856766346214
2012-10-01 00:00:00
-0.2022635684334252
-0.09002643521251785
2013-01-01 00:00:00
-0.16819809617091608
0.05916582268188941
2013-04-01 00:00:00
-0.10421090654546916
0.10943220572117252
The distribution of the stocks
Correlation Analysis
Collecting the Macroeconomic Variables
At this point, I start collecting macroeconomic variables to be used in APT. These are: Quarterly GDP per capita growth, quarterly inflation growth, and quarterly oil price growth. I use two main database which are: * FRED * QUANDL
DGS10
DGS10
2023-01-08 00:00:00
GS10
GS10
2023-01-08 00:00:00
WGS10YR
WGS10YR
2023-01-08 00:00:00
DGS2
DGS2
2023-01-08 00:00:00
DGS1
DGS1
2023-01-08 00:00:00
GS2
GS2
2023-01-08 00:00:00
WGS2YR
WGS2YR
2023-01-08 00:00:00
GS1
GS1
2023-01-08 00:00:00
WGS1YR
WGS1YR
2023-01-08 00:00:00
DGS5
DGS5
2023-01-08 00:00:00
So, we have a risk-free rate. Let’s move on and gather GDP growth, inflation growth, and oil return data.
GDP
Inflation
2012-01-01 243.820
2012-02-01 244.783
2012-03-01 246.291
2012-04-01 246.995
2012-05-01 246.813
dtype: float64
2019-09-01 279.587
2019-10-01 280.303
2019-11-01 280.376
2019-12-01 280.315
2020-01-01 281.482
dtype: float64
Oil Price
2012-03-31 00:00:00
118.42796536796538
2012-06-30 00:00:00
109.0604071773637
2012-09-30 00:00:00
110.13382674571805
2012-12-31 00:00:00
110.42449149883934
2013-03-31 00:00:00
112.8671801242236
2013-06-30 00:00:00
103.09964492753623
2013-09-30 00:00:00
110.26686805947675
2013-12-31 00:00:00
109.61320879603488
2014-03-31 00:00:00
108.21101725327811
2014-06-30 00:00:00
110.02562049062048
2012-06-30 00:00:00
-0.07909920736623244
2012-09-30 00:00:00
0.009842431328985102
2012-12-31 00:00:00
0.002639195982832687
2013-03-31 00:00:00
0.022120895394025286
2013-06-30 00:00:00
-0.08654008353834164
0
-0.0259361106585535
-0.05227600202102978
1
0.1422945272812901
-0.14971856766346214
2
-0.2022635684334252
-0.09002643521251785
3
-0.16819809617091608
0.05916582268188941
4
-0.10421090654546916
0.10943220572117252
2012-06-30 00:00:00
-0.07909920736623244
2012-09-30 00:00:00
0.009842431328985102
2012-12-31 00:00:00
0.002639195982832687
2013-03-31 00:00:00
0.022120895394025286
2013-06-30 00:00:00
-0.08654008353834164
2013-09-30 00:00:00
0.06951743759135165
2013-12-31 00:00:00
-0.005927975238122163
2014-03-31 00:00:00
-0.012792176765538565
2014-06-30 00:00:00
0.016769117261832278
2014-09-30 00:00:00
-0.06774064877456853
0
0.008607101552671192
0.007660968792778222
1
0.0069358362646565475
0.002695388670725052
2
0.006179463391737583
0.0006504875289554679
3
0.01270761844453605
0.0063647118517689005
4
0.004239628842297005
0.0053307869664531715
0
0.008607101552671192
0.007660968792778222
1
0.0069358362646565475
0.002695388670725052
2
0.006179463391737583
0.0006504875289554679
3
0.01270761844453605
0.0063647118517689005
4
0.004239628842297005
0.0053307869664531715
5
0.012666029164496662
0.00389241710322219
6
0.013130217441027492
-0.001975766056577566
7
0.0006517787717981172
0.008666233819688784
8
0.01857307401809405
0.01091775484414459
9
0.016064179754989638
0.0019037102818584284
Arbitrage pricing model
First model output shows the association between excess return of Apple and pre-defined macroeconomic variables. Accordingly, the estimated coefficient of the model is not statistically significant indicating that these macroeconomic variables do not account for the excess return of Apple. More specifically, by looking at p-values, I conclude that the estimated coefficients of gdp growth, inflation growth, and oil return is not statistically significant at conventional levels.
1. AAPL Stock
The R-squared value of 0.145 indicates that the model explains about 14.5% of the variance in the dependent variable. The adjusted R-squared value of 0.050 is a modified version that adjusts for the number of independent variables in the model and the sample size.
The F-statistic of 1.531 and the associated p-value of 0.229 indicate that the model as a whole is not a significant predictor of the dependent variable. This means that the independent variables in the model do not significantly improve the prediction of the dependent variable beyond the intercept.
The coefficients table shows the estimated values of the model parameters, along with the standard errors, t-values, and p-values. The t-values and p-values are used to assess the statistical significance of each independent variable. A t-value greater than 2 and a p-value less than 0.05 indicates that the corresponding independent variable is a significant predictor of the dependent variable. In this case, only the gdp_growth variable has a statistically significant t-value and p-value.
We can see the same thing for INTC and MSFT stocks
2. INTC Stock
3. MSFT Stock
Conclusion
The results of the models suggest that APT cannot be validated by using US macroeconomic variables except for the GDP growth in Intel's case. As a final note, the variance in the dependent variable explained by an independent variable is quite low. This also implies that the model has very weak explanatory power and this needs to be improved. There are some ways to do that but two main possible modifications may be:
Using additional variables which might be more related to excess stock return lke news (see this article )
Using a different model
Testing in a different time period and country