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:
from fredapi import Fred
fred = Fred(api_key=apikey)
# Load required packagesimport statsmodels.api as smfmodels
models=for i in(data1,data2,data3):
formula ="excess_return~ gdp_growth+inf_growth+oil_return"
models.append(smfmodels.OLS.from_formula(formula, data = i).fit())
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
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 )