Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 7.8.0 -- An enhanced Interactive Python.
In [1]: runfile('C:/Users/DonsLaptop/Dropbox/Teaching/lehigh/FIN377 Advanced Topics Data Analytics for Finance/website-lectures/content/01/python-files/a_simple_program.py', wdir='C:/Users/DonsLaptop/Dropbox/Teaching/lehigh/FIN377 Advanced Topics Data Analytics for Finance/website-lectures/content/01/python-files')
AAPL MSFT VZ
count 3528.000000 3528.000000 3528.000000
mean 0.001195 0.000737 0.000501
std 0.019995 0.016714 0.013021
min -0.179195 -0.117131 -0.080686
25% -0.008108 -0.007091 -0.006258
50% 0.000951 0.000467 0.000697
75% 0.011266 0.008476 0.007202
max 0.139049 0.186047 0.146324
C:\Users\DoLe\Anaconda3\lib\site-packages\statsmodels\nonparametric\kde.py:447: RuntimeWarning: invalid value encountered in greater
X = X[np.logical_and(X > clip[0], X < clip[1])] # won't work for two columns.
C:\Users\DoLe\Anaconda3\lib\site-packages\statsmodels\nonparametric\kde.py:447: RuntimeWarning: invalid value encountered in less
X = X[np.logical_and(X > clip[0], X < clip[1])] # won't work for two columns.
mkt_excess SMB ... AAPL_excess VZ_excess
count 3502.000000 3502.000000 ... 3501.000000 3501.000000
mean 0.037935 0.000922 ... 0.111566 0.046342
std 1.197182 0.567292 ... 2.004503 1.305617
min -8.950000 -3.400000 ... -17.926523 -8.072580
25% -0.400000 -0.330000 ... -0.823111 -0.630412
50% 0.075000 0.000000 ... 0.088688 0.068038
75% 0.560000 0.330000 ... 1.120616 0.719437
max 11.350000 4.490000 ... 13.900947 14.628356
[8 rows x 12 columns]
mkt_excess SMB HML RMW CMA RF AAPL MSFT \
count 3502.00 3502.00 3502.00 3502.00 3502.00 3502.00 3501.00 3501.00
mean 0.04 0.00 -0.01 0.01 0.00 0.00 0.12 0.07
std 1.20 0.57 0.66 0.36 0.31 0.01 2.00 1.68
min -8.95 -3.40 -4.24 -2.62 -1.74 0.00 -17.92 -11.71
25% -0.40 -0.33 -0.31 -0.19 -0.18 0.00 -0.82 -0.71
50% 0.08 0.00 -0.03 0.01 -0.01 0.00 0.09 0.04
75% 0.56 0.33 0.26 0.21 0.17 0.01 1.12 0.85
max 11.35 4.49 4.83 1.95 1.96 0.02 13.90 18.60
VZ MSFT_excess AAPL_excess VZ_excess
count 3501.00 3501.00 3501.00 3501.00
mean 0.05 0.07 0.11 0.05
std 1.31 1.68 2.00 1.31
min -8.07 -11.71 -17.93 -8.07
25% -0.63 -0.72 -0.82 -0.63
50% 0.07 0.04 0.09 0.07
75% 0.72 0.85 1.12 0.72
max 14.63 18.60 13.90 14.63
========================================
MSFT
========================================
OLS Regression Results
==============================================================================
Dep. Variable: MSFT_excess R-squared: 0.533
Model: OLS Adj. R-squared: 0.533
Method: Least Squares F-statistic: 1331.
Date: Fri, 10 Jan 2020 Prob (F-statistic): 0.00
Time: 00:08:16 Log-Likelihood: -5442.2
No. Observations: 3501 AIC: 1.089e+04
Df Residuals: 3497 BIC: 1.092e+04
Df Model: 3
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Intercept 0.0236 0.019 1.217 0.224 -0.014 0.062
mkt_excess 1.1043 0.018 62.865 0.000 1.070 1.139
SMB -0.3962 0.035 -11.221 0.000 -0.465 -0.327
HML -0.4470 0.031 -14.398 0.000 -0.508 -0.386
==============================================================================
Omnibus: 836.860 Durbin-Watson: 2.005
Prob(Omnibus): 0.000 Jarque-Bera (JB): 40286.368
Skew: -0.251 Prob(JB): 0.00
Kurtosis: 19.611 Cond. No. 2.27
==============================================================================
Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
========================================
AAPL
========================================
OLS Regression Results
==============================================================================
Dep. Variable: AAPL_excess R-squared: 0.380
Model: OLS Adj. R-squared: 0.379
Method: Least Squares F-statistic: 714.0
Date: Fri, 10 Jan 2020 Prob (F-statistic): 0.00
Time: 00:08:16 Log-Likelihood: -6565.4
No. Observations: 3501 AIC: 1.314e+04
Df Residuals: 3497 BIC: 1.316e+04
Df Model: 3
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Intercept 0.0676 0.027 2.532 0.011 0.015 0.120
mkt_excess 1.0965 0.024 45.289 0.000 1.049 1.144
SMB -0.1288 0.049 -2.647 0.008 -0.224 -0.033
HML -0.4265 0.043 -9.969 0.000 -0.510 -0.343
==============================================================================
Omnibus: 651.193 Durbin-Watson: 1.940
Prob(Omnibus): 0.000 Jarque-Bera (JB): 10938.202
Skew: 0.389 Prob(JB): 0.00
Kurtosis: 11.624 Cond. No. 2.27
==============================================================================
Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
========================================
VZ
========================================
OLS Regression Results
==============================================================================
Dep. Variable: VZ_excess R-squared: 0.394
Model: OLS Adj. R-squared: 0.393
Method: Least Squares F-statistic: 757.6
Date: Fri, 10 Jan 2020 Prob (F-statistic): 0.00
Time: 00:08:16 Log-Likelihood: -5024.3
No. Observations: 3501 AIC: 1.006e+04
Df Residuals: 3497 BIC: 1.008e+04
Df Model: 3
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Intercept 0.0213 0.017 1.236 0.217 -0.012 0.055
mkt_excess 0.6924 0.016 44.411 0.000 0.662 0.723
SMB -0.3494 0.031 -11.150 0.000 -0.411 -0.288
HML 0.0805 0.028 2.923 0.003 0.027 0.135
==============================================================================
Omnibus: 770.293 Durbin-Watson: 1.910
Prob(Omnibus): 0.000 Jarque-Bera (JB): 12316.887
Skew: 0.603 Prob(JB): 0.00
Kurtosis: 12.109 Cond. No. 2.27
==============================================================================
Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
MSFT AAPL VZ
Intercept 0.0236 0.0676 0.0213
mkt_excess 1.1043 1.0965 0.6924
SMB -0.3962 -0.1288 -0.3494
HML -0.4470 -0.4265 0.0805
C:\Users\DoLe\Anaconda3\lib\site-packages\pandas\plotting\_matplotlib\converter.py:103: FutureWarning: Using an implicitly registered datetime converter for a matplotlib plotting method. The converter was registered by pandas on import. Future versions of pandas will require you to explicitly register matplotlib converters.
To register the converters:
>>> from pandas.plotting import register_matplotlib_converters
>>> register_matplotlib_converters()
warnings.warn(msg, FutureWarning)
In [2]: