Fitting a volatility model on indices
Today a quant posed me a question:
If I had a sorted timeseries, how would I know if it was ordered correctly? What if it's in reverse?
After having an interesting conversation about how I would problem-solve the issue, he infomed me that a straightforward way was to fit a GARCH model, and that the model fit would be much higher if the timeseries was sorted in the right direction. While I wasn't quite sure of the econometric underpinnings of the solution, its not difficult to explore the idea.
In a previous post, we tried using the Google stock, and in this post we will try using an index, as per his suggestion. In this post, I've downloaded the following data from Ken French's data library
- 10 US industry indices.
- Fama-French 5 factors.
Although I could have used Yahoo/Google/Quandl/etc., I decided that for full transparency, the Ken French datasets are basically for academic use and are very robust datasets. Instead of using the SPY which is really an S&P500 ETF, I've used the Market Returns data as the market index.
Importing all necessary modules¶
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn
import os
import pandas_datareader.data as web
from pandas_datareader.famafrench import get_available_datasets
import datetime
from arch import arch_model
from statsmodels.tsa.stattools import acf, pacf
Data preparation¶
Reading the index timeseries¶
datasets = get_available_datasets()
print('No. of datasets:{0}'.format(len(datasets)))
# datasets #comment out if you want to see all the datasets
No. of datasets:286
Reading industry indices (monthly/daily)¶
ls_10_industry = [dataset for dataset in datasets if '10' in dataset and 'Industry' in dataset]
print(ls_10_industry)
dict_industry_m = web.DataReader(ls_10_industry[0],'famafrench',start='1963-07-01',end='2018-11-01') # Taking [0] as extracting '10_Industry_Portfolios (Monthly)'
df_industry_m = dict_industry_m[0] # Extracting value-weighted
dict_industry_d = web.DataReader(ls_10_industry[2],'famafrench',start='1963-07-01',end='2018-11-01') # Taking [2] as extracting '10_Industry_Portfolios (Daily)'
df_industry_d = dict_industry_d[0] # Extracting value-weighted
['10_Industry_Portfolios', '10_Industry_Portfolios_Wout_Div', '10_Industry_Portfolios_daily']
Reading factor datasets (monthly/daily)¶
ls_5_factor = [dataset for dataset in datasets if 'Factors' in dataset and '5' in dataset]
print(ls_5_factor)
dict_factor_m = web.DataReader(ls_5_factor[0],'famafrench',start='1963-07-01',end='2018-11-01') # Taking [0] as extracting 5 factor (Monthly)
df_factor_m = dict_factor_m[0]
dict_industry_d = web.DataReader(ls_5_factor[1],'famafrench',start='1963-07-01',end='2018-11-01') # Taking [1] as extracting 5 factor (Daily)
df_factor_d = dict_industry_d[0]
['F-F_Research_Data_5_Factors_2x3', 'F-F_Research_Data_5_Factors_2x3_daily', 'Global_5_Factors', 'Global_5_Factors_Daily', 'Global_ex_US_5_Factors', 'Global_ex_US_5_Factors_Daily', 'Europe_5_Factors', 'Europe_5_Factors_Daily', 'Japan_5_Factors', 'Japan_5_Factors_Daily', 'Asia_Pacific_ex_Japan_5_Factors', 'Asia_Pacific_ex_Japan_5_Factors_Daily', 'North_America_5_Factors', 'North_America_5_Factors_Daily']
Plotting indices & factors¶
df_industry_d.plot(title='US industry index Returns (Daily)')
<matplotlib.axes._subplots.AxesSubplot at 0x298e6e8d7f0>
df_factor_d.head()
| Mkt-RF | SMB | HML | RMW | CMA | RF | |
|---|---|---|---|---|---|---|
| Date | ||||||
| 1963-07-01 | -0.67 | 0.00 | -0.32 | -0.01 | 0.15 | 0.012 |
| 1963-07-02 | 0.79 | -0.27 | 0.27 | -0.07 | -0.19 | 0.012 |
| 1963-07-03 | 0.63 | -0.17 | -0.09 | 0.17 | -0.33 | 0.012 |
| 1963-07-05 | 0.40 | 0.08 | -0.28 | 0.08 | -0.33 | 0.012 |
| 1963-07-08 | -0.63 | 0.04 | -0.18 | -0.29 | 0.13 | 0.012 |
df_factor_d.plot(title='Factor Returns (Daily)')
<matplotlib.axes._subplots.AxesSubplot at 0x298e71590b8>
df_factor_d['MKT'] = df_factor_d['Mkt-RF'] + df_factor_d['RF']
ret = df_factor_d['MKT']
ret.plot(title='Market Returns')
<matplotlib.axes._subplots.AxesSubplot at 0x298e745ef60>
Econometrics¶
Fitting models on the market factor (daily)¶
Calculating ACF¶
ret_acf_1 = acf(ret)[1:32]
ret_acf_2 = [ret.autocorr(i) for i in range(1,32)]
test_df = pd.DataFrame([ret_acf_1, ret_acf_2]).T
test_df.columns = ['Pandas Autocorr', 'Statsmodels Autocorr']
test_df.index += 1
test_df.plot(kind='bar')
<matplotlib.axes._subplots.AxesSubplot at 0x298e76c51d0>
Fitting a GARCH model (Forward)¶
am = arch_model(ret)
res = am.fit(update_freq=10)
print(res.summary())
Iteration: 10, Func. Count: 76, Neg. LLF: 16722.656929069963
Optimization terminated successfully. (Exit mode 0)
Current function value: 16722.5951086026
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16722.6
Distribution: Normal AIC: 33453.2
Method: Maximum Likelihood BIC: 33483.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:36 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0658 6.290e-03 10.463 1.273e-25 [5.348e-02,7.814e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.3880e-03 2.104e-03 4.462 8.124e-06 [5.264e-03,1.351e-02]
alpha[1] 0.0917 1.140e-02 8.049 8.364e-16 [6.941e-02, 0.114]
beta[1] 0.9005 1.144e-02 78.703 0.000 [ 0.878, 0.923]
============================================================================
Covariance estimator: robust
Fitting a GARCH model (Reverse)¶
ret_reverse = ret.iloc[::-1]
plt.plot(ret_reverse.values)
plt.title('Index Returns (Reversed)')
Text(0.5, 1.0, 'Index Returns (Reversed)')
ret_acf_1_rev = acf(ret_reverse)[1:32]
ret_acf_2_rev = [ret_reverse.autocorr(i) for i in range(1,32)]
test_df = pd.DataFrame([ret_acf_1_rev, ret_acf_2_rev]).T
test_df.columns = ['Pandas Autocorr', 'Statsmodels Autocorr']
test_df.index += 1
test_df.plot(kind='bar')
<matplotlib.axes._subplots.AxesSubplot at 0x298e7c5e160>
am_rev = arch_model(ret_reverse)
res_rev = am_rev.fit(update_freq=5)
print(res_rev.summary())
Iteration: 5, Func. Count: 40, Neg. LLF: 16684.236263530434
Iteration: 10, Func. Count: 75, Neg. LLF: 16674.60452658196
Optimization terminated successfully. (Exit mode 0)
Current function value: 16674.586540367545
Iterations: 12
Function evaluations: 88
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16674.6
Distribution: Normal AIC: 33357.2
Method: Maximum Likelihood BIC: 33387.3
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:37 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0677 5.844e-03 11.592 4.543e-31 [5.628e-02,7.919e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 8.2528e-03 1.629e-03 5.066 4.065e-07 [5.060e-03,1.145e-02]
alpha[1] 0.0963 7.864e-03 12.247 1.734e-34 [8.090e-02, 0.112]
beta[1] 0.8976 8.147e-03 110.171 0.000 [ 0.882, 0.914]
============================================================================
Covariance estimator: robust
So both the forward and reverse timeseries have GARCH models that can be estimated. Thus, I'm not sure what that quant meant. Technically, whether a time series is reversed or not, its just a set of returns thus its not certain how the fit of a GARCH model would lead to one knowing whether it is reversed or not. All I can see is that it took more iterations for a reverse timeseries to converge. The other part is that perhaps the p-values for the reverse case are very small indicating that all the variables of the GARCH model are extremely significant?
Fitting a GARCH-GJR model (Forward)¶
am = arch_model(ret, p=1, o=1, q=1)
res = am.fit(update_freq=5, disp='off')
print(res.summary())
Constant Mean - GJR-GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GJR-GARCH Log-Likelihood: -16575.0
Distribution: Normal AIC: 33160.0
Method: Maximum Likelihood BIC: 33197.7
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13927
Time: 11:52:37 Df Model: 5
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0495 5.957e-03 8.309 9.636e-17 [3.783e-02,6.118e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0111 2.414e-03 4.609 4.045e-06 [6.394e-03,1.586e-02]
alpha[1] 0.0280 5.002e-03 5.604 2.089e-08 [1.823e-02,3.784e-02]
gamma[1] 0.1080 1.482e-02 7.284 3.243e-13 [7.891e-02, 0.137]
beta[1] 0.9050 1.094e-02 82.722 0.000 [ 0.884, 0.926]
============================================================================
Covariance estimator: robust
Fitting a GARCH-GJR model (Reverse)¶
am = arch_model(ret_reverse, p=1, o=1, q=1)
res = am.fit(update_freq=5, disp='off')
print(res.summary())
Constant Mean - GJR-GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GJR-GARCH Log-Likelihood: -16450.2
Distribution: Normal AIC: 32910.4
Method: Maximum Likelihood BIC: 32948.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13927
Time: 11:52:37 Df Model: 5
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0814 5.802e-03 14.030 1.016e-44 [7.003e-02,9.277e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 4.9258e-03 1.062e-03 4.638 3.526e-06 [2.844e-03,7.008e-03]
alpha[1] 0.1363 9.517e-03 14.321 1.607e-46 [ 0.118, 0.155]
gamma[1] -0.1236 8.157e-03 -15.153 7.285e-52 [ -0.140, -0.108]
beta[1] 0.9255 6.722e-03 137.679 0.000 [ 0.912, 0.939]
============================================================================
Covariance estimator: robust
All factor returns with FORWARD & BACKWARD timeseries (daily).¶
for column in df_factor_d:
print('***Industry Name (Forward)***: {0}\n'.format(column))
am = arch_model(df_factor_d[column])
res = am.fit(update_freq=5)
print(res.summary())
print('***Industry Name (Reverse)***: {0}\n'.format(column))
am_rev = arch_model(df_factor_d[column][::-1]) # reverse timeseries
res_rev = am_rev.fit(update_freq=5)
print(res_rev.summary())
***Industry Name (Forward)***: Mkt-RF
Iteration: 5, Func. Count: 40, Neg. LLF: 16734.59951173937
Iteration: 10, Func. Count: 76, Neg. LLF: 16725.801446361995
Optimization terminated successfully. (Exit mode 0)
Current function value: 16725.746445889257
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Mkt-RF R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16725.7
Distribution: Normal AIC: 33459.5
Method: Maximum Likelihood BIC: 33489.7
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0484 6.316e-03 7.662 1.836e-14 [3.601e-02,6.077e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.3982e-03 2.111e-03 4.452 8.510e-06 [5.261e-03,1.354e-02]
alpha[1] 0.0917 1.139e-02 8.053 8.068e-16 [6.942e-02, 0.114]
beta[1] 0.9004 1.145e-02 78.648 0.000 [ 0.878, 0.923]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Mkt-RF
Iteration: 5, Func. Count: 40, Neg. LLF: 16687.817315938606
Iteration: 10, Func. Count: 75, Neg. LLF: 16678.201068432514
Optimization terminated successfully. (Exit mode 0)
Current function value: 16678.17884317169
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Mkt-RF R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16678.2
Distribution: Normal AIC: 33364.4
Method: Maximum Likelihood BIC: 33394.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0502 5.853e-03 8.581 9.373e-18 [3.875e-02,6.169e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 8.2194e-03 1.619e-03 5.076 3.864e-07 [5.045e-03,1.139e-02]
alpha[1] 0.0962 7.825e-03 12.289 1.033e-34 [8.083e-02, 0.111]
beta[1] 0.8977 8.102e-03 110.808 0.000 [ 0.882, 0.914]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: SMB
Iteration: 5, Func. Count: 38, Neg. LLF: 8709.502871702567
Iteration: 10, Func. Count: 75, Neg. LLF: 8706.210621517967
Optimization terminated successfully. (Exit mode 0)
Current function value: 8706.209422257236
Iterations: 12
Function evaluations: 87
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: SMB R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -8706.21
Distribution: Normal AIC: 17420.4
Method: Maximum Likelihood BIC: 17450.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0123 3.694e-03 3.330 8.680e-04 [5.062e-03,1.954e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.2394e-03 4.711e-04 4.753 2.000e-06 [1.316e-03,3.163e-03]
alpha[1] 0.0859 9.077e-03 9.465 2.931e-21 [6.812e-02, 0.104]
beta[1] 0.9092 8.936e-03 101.747 0.000 [ 0.892, 0.927]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: SMB
Iteration: 5, Func. Count: 41, Neg. LLF: 8733.307477367558
Iteration: 10, Func. Count: 77, Neg. LLF: 8725.16724146458
Optimization terminated successfully. (Exit mode 0)
Current function value: 8725.166321820576
Iterations: 11
Function evaluations: 83
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: SMB R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -8725.17
Distribution: Normal AIC: 17458.3
Method: Maximum Likelihood BIC: 17488.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0107 3.765e-03 2.833 4.611e-03 [3.287e-03,1.804e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.3706e-03 5.043e-04 4.701 2.594e-06 [1.382e-03,3.359e-03]
alpha[1] 0.0890 8.614e-03 10.327 5.320e-25 [7.208e-02, 0.106]
beta[1] 0.9056 8.567e-03 105.702 0.000 [ 0.889, 0.922]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: HML
Iteration: 5, Func. Count: 40, Neg. LLF: 6596.831658066217
Iteration: 10, Func. Count: 75, Neg. LLF: 6573.218398198052
Optimization terminated successfully. (Exit mode 0)
Current function value: 6572.819132932525
Iterations: 14
Function evaluations: 101
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HML R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -6572.82
Distribution: Normal AIC: 13153.6
Method: Maximum Likelihood BIC: 13183.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 9.8457e-03 2.993e-03 3.289 1.005e-03 [3.979e-03,1.571e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.0469e-03 4.004e-04 5.113 3.178e-07 [1.262e-03,2.832e-03]
alpha[1] 0.0958 9.885e-03 9.692 3.277e-22 [7.642e-02, 0.115]
beta[1] 0.8963 1.055e-02 84.927 0.000 [ 0.876, 0.917]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: HML
Iteration: 5, Func. Count: 44, Neg. LLF: 6648.109438172432
Iteration: 10, Func. Count: 80, Neg. LLF: 6604.093721414287
Iteration: 15, Func. Count: 114, Neg. LLF: 6601.908658586344
Optimization terminated successfully. (Exit mode 0)
Current function value: 6601.908200694622
Iterations: 18
Function evaluations: 126
Gradient evaluations: 17
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HML R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -6601.91
Distribution: Normal AIC: 13211.8
Method: Maximum Likelihood BIC: 13242.0
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 9.5113e-03 3.037e-03 3.132 1.735e-03 [3.560e-03,1.546e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 1.9129e-03 3.797e-04 5.038 4.713e-07 [1.169e-03,2.657e-03]
alpha[1] 0.0909 8.756e-03 10.377 3.162e-25 [7.369e-02, 0.108]
beta[1] 0.9014 9.763e-03 92.320 0.000 [ 0.882, 0.921]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: RMW
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 2371.7406000324763
Iterations: 6
Function evaluations: 18
Gradient evaluations: 2
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RMW R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -2371.74
Distribution: Normal AIC: 4751.48
Method: Maximum Likelihood BIC: 4781.65
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:38 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0117 2.055e-03 5.686 1.302e-08 [7.656e-03,1.571e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.6907e-03 8.369e-04 3.215 1.304e-03 [1.050e-03,4.331e-03]
alpha[1] 0.1000 1.500e-02 6.666 2.625e-11 [7.060e-02, 0.129]
beta[1] 0.8800 2.061e-02 42.701 0.000 [ 0.840, 0.920]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Reverse)***: RMW
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 2374.640197600779
Iterations: 5
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RMW R-squared: 0.000
Mean Model: Constant Mean Adj. R-squared: 0.000
Vol Model: GARCH Log-Likelihood: -2374.64
Distribution: Normal AIC: 4757.28
Method: Maximum Likelihood BIC: 4787.45
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0130 2.043e-03 6.369 1.902e-10 [9.007e-03,1.701e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.6907e-03 6.725e-04 4.001 6.299e-05 [1.373e-03,4.009e-03]
alpha[1] 0.1000 1.254e-02 7.978 1.491e-15 [7.543e-02, 0.125]
beta[1] 0.8800 1.658e-02 53.063 0.000 [ 0.847, 0.913]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Forward)***: CMA
C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning) C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning)
Iteration: 5, Func. Count: 48, Neg. LLF: 3118.4188717669335
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 3108.0255270368143
Iterations: 12
Function evaluations: 74
Gradient evaluations: 8
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: CMA R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -3108.03
Distribution: Normal AIC: 6224.05
Method: Maximum Likelihood BIC: 6254.22
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 6.2631e-03 2.344e-03 2.672 7.533e-03 [1.670e-03,1.086e-02]
Volatility Model
=============================================================================
coef std err t P>|t| 95.0% Conf. Int.
-----------------------------------------------------------------------------
omega 2.1592e-03 5.019e-03 0.430 0.667 [-7.679e-03,1.200e-02]
alpha[1] 0.0809 8.444e-02 0.958 0.338 [-8.464e-02, 0.246]
beta[1] 0.9006 0.127 7.113 1.136e-12 [ 0.652, 1.149]
=============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Reverse)***: CMA
Iteration: 5, Func. Count: 42, Neg. LLF: 3113.6414223355587
Iteration: 10, Func. Count: 87, Neg. LLF: 3096.0215680249485
Iteration: 15, Func. Count: 120, Neg. LLF: 3092.3128338652205
Optimization terminated successfully. (Exit mode 0)
Current function value: 3092.3122521318437
Iterations: 19
Function evaluations: 138
Gradient evaluations: 18
C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning)
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: CMA R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -3092.31
Distribution: Normal AIC: 6192.62
Method: Maximum Likelihood BIC: 6222.79
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 6.2904e-03 2.364e-03 2.661 7.785e-03 [1.658e-03,1.092e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.5973e-04 2.496e-04 3.846 1.202e-04 [4.706e-04,1.449e-03]
alpha[1] 0.0671 9.068e-03 7.404 1.325e-13 [4.936e-02,8.491e-02]
beta[1] 0.9250 1.029e-02 89.902 0.000 [ 0.905, 0.945]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: RF
Inequality constraints incompatible (Exit mode 4)
Current function value: -48479.902615081635
Iterations: 1
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RF R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: 48479.9
Distribution: Normal AIC: -96951.8
Method: Maximum Likelihood BIC: -96921.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0182 9.576e-09 1.899e+06 0.000 [1.818e-02,1.818e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.1427e-06 7.494e-13 4.193e+06 0.000 [3.143e-06,3.143e-06]
alpha[1] 0.2000 2.237e-03 89.422 0.000 [ 0.196, 0.204]
beta[1] 0.7800 2.045e-03 381.500 0.000 [ 0.776, 0.784]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Inequality constraints incompatible. See convergence_flag.
***Industry Name (Reverse)***: RF
Inequality constraints incompatible (Exit mode 4)
Current function value: -48478.55702360397
Iterations: 1
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RF R-squared: 0.000
Mean Model: Constant Mean Adj. R-squared: 0.000
Vol Model: GARCH Log-Likelihood: 48478.6
Distribution: Normal AIC: -96949.1
Method: Maximum Likelihood BIC: -96918.9
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0182 1.018e-08 1.787e+06 0.000 [1.818e-02,1.818e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.1427e-06 1.077e-12 2.918e+06 0.000 [3.143e-06,3.143e-06]
alpha[1] 0.2000 2.263e-03 88.369 0.000 [ 0.196, 0.204]
beta[1] 0.7800 2.079e-03 375.105 0.000 [ 0.776, 0.784]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Inequality constraints incompatible. See convergence_flag.
***Industry Name (Forward)***: MKT
C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 4. The message is: Inequality constraints incompatible See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning) C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 4. The message is: Inequality constraints incompatible See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning)
Iteration: 5, Func. Count: 40, Neg. LLF: 16731.492832095857
Iteration: 10, Func. Count: 76, Neg. LLF: 16722.656929069963
Optimization terminated successfully. (Exit mode 0)
Current function value: 16722.5951086026
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16722.6
Distribution: Normal AIC: 33453.2
Method: Maximum Likelihood BIC: 33483.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0658 6.290e-03 10.463 1.273e-25 [5.348e-02,7.814e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.3880e-03 2.104e-03 4.462 8.124e-06 [5.264e-03,1.351e-02]
alpha[1] 0.0917 1.140e-02 8.049 8.364e-16 [6.941e-02, 0.114]
beta[1] 0.9005 1.144e-02 78.703 0.000 [ 0.878, 0.923]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: MKT
Iteration: 5, Func. Count: 40, Neg. LLF: 16684.236263530434
Iteration: 10, Func. Count: 75, Neg. LLF: 16674.60452658196
Optimization terminated successfully. (Exit mode 0)
Current function value: 16674.586540367545
Iterations: 12
Function evaluations: 88
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16674.6
Distribution: Normal AIC: 33357.2
Method: Maximum Likelihood BIC: 33387.3
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0677 5.844e-03 11.592 4.543e-31 [5.628e-02,7.919e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 8.2528e-03 1.629e-03 5.066 4.065e-07 [5.060e-03,1.145e-02]
alpha[1] 0.0963 7.864e-03 12.247 1.734e-34 [8.090e-02, 0.112]
beta[1] 0.8976 8.147e-03 110.171 0.000 [ 0.882, 0.914]
============================================================================
Covariance estimator: robust
All industry indices with FORWARD & BACKWARD timeseries (daily).¶
for column in df_industry_d:
print('***Industry Name (Forward)***: {0}\n'.format(column))
am = arch_model(df_industry_d[column])
res = am.fit(update_freq=5)
print(res.summary())
print('***Industry Name (Reverse)***: {0}\n'.format(column))
am_rev = arch_model(df_industry_d[column][::-1]) # reverse timeseries
res_rev = am_rev.fit(update_freq=5)
print(res_rev.summary())
***Industry Name (Forward)***: NoDur
Iteration: 5, Func. Count: 41, Neg. LLF: 15492.705944464738
Iteration: 10, Func. Count: 78, Neg. LLF: 15485.169967829474
Optimization terminated successfully. (Exit mode 0)
Current function value: 15485.169958165197
Iterations: 11
Function evaluations: 84
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: NoDur R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -15485.2
Distribution: Normal AIC: 30978.3
Method: Maximum Likelihood BIC: 31008.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:39 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0640 5.675e-03 11.272 1.794e-29 [5.284e-02,7.509e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 7.3524e-03 1.782e-03 4.126 3.688e-05 [3.860e-03,1.084e-02]
alpha[1] 0.0860 1.076e-02 7.998 1.268e-15 [6.494e-02, 0.107]
beta[1] 0.9068 1.146e-02 79.114 0.000 [ 0.884, 0.929]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: NoDur
Iteration: 5, Func. Count: 42, Neg. LLF: 15464.406710982443
Iteration: 10, Func. Count: 77, Neg. LLF: 15456.689089630043
Optimization terminated successfully. (Exit mode 0)
Current function value: 15456.689069506094
Iterations: 11
Function evaluations: 83
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: NoDur R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -15456.7
Distribution: Normal AIC: 30921.4
Method: Maximum Likelihood BIC: 30951.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0655 5.650e-03 11.590 4.628e-31 [5.441e-02,7.656e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 7.4178e-03 1.497e-03 4.954 7.263e-07 [4.483e-03,1.035e-02]
alpha[1] 0.0905 8.127e-03 11.141 7.915e-29 [7.462e-02, 0.106]
beta[1] 0.9019 8.649e-03 104.279 0.000 [ 0.885, 0.919]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Durbl
Iteration: 5, Func. Count: 38, Neg. LLF: 21384.246812287965
Iteration: 10, Func. Count: 73, Neg. LLF: 21381.881872802725
Optimization terminated successfully. (Exit mode 0)
Current function value: 21381.881254907657
Iterations: 12
Function evaluations: 85
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Durbl R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -21381.9
Distribution: Normal AIC: 42771.8
Method: Maximum Likelihood BIC: 42801.9
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0568 8.802e-03 6.448 1.135e-10 [3.950e-02,7.400e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0205 4.385e-03 4.666 3.064e-06 [1.187e-02,2.906e-02]
alpha[1] 0.0702 9.433e-03 7.438 1.019e-13 [5.168e-02,8.865e-02]
beta[1] 0.9171 1.080e-02 84.902 0.000 [ 0.896, 0.938]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Durbl
Iteration: 5, Func. Count: 38, Neg. LLF: 21364.42571610683
Iteration: 10, Func. Count: 74, Neg. LLF: 21357.710255264654
Optimization terminated successfully. (Exit mode 0)
Current function value: 21357.693334789055
Iterations: 13
Function evaluations: 92
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Durbl R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -21357.7
Distribution: Normal AIC: 42723.4
Method: Maximum Likelihood BIC: 42753.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0565 8.808e-03 6.412 1.438e-10 [3.921e-02,7.374e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0204 3.466e-03 5.881 4.073e-09 [1.359e-02,2.718e-02]
alpha[1] 0.0735 6.489e-03 11.330 9.340e-30 [6.080e-02,8.624e-02]
beta[1] 0.9135 7.639e-03 119.590 0.000 [ 0.899, 0.929]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Manuf
Iteration: 5, Func. Count: 42, Neg. LLF: 17662.95692593312
Iteration: 10, Func. Count: 76, Neg. LLF: 17657.425862615026
Optimization terminated successfully. (Exit mode 0)
Current function value: 17657.425815186456
Iterations: 11
Function evaluations: 82
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Manuf R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17657.4
Distribution: Normal AIC: 35322.9
Method: Maximum Likelihood BIC: 35353.0
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0702 6.870e-03 10.220 1.612e-24 [5.675e-02,8.368e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0125 2.823e-03 4.445 8.781e-06 [7.016e-03,1.808e-02]
alpha[1] 0.0912 1.310e-02 6.961 3.376e-12 [6.552e-02, 0.117]
beta[1] 0.8982 1.359e-02 66.077 0.000 [ 0.872, 0.925]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Manuf
Iteration: 5, Func. Count: 42, Neg. LLF: 17625.74310704491
Iteration: 10, Func. Count: 76, Neg. LLF: 17619.205897060987
Optimization terminated successfully. (Exit mode 0)
Current function value: 17619.205853753512
Iterations: 11
Function evaluations: 82
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Manuf R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17619.2
Distribution: Normal AIC: 35246.4
Method: Maximum Likelihood BIC: 35276.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0714 6.453e-03 11.067 1.817e-28 [5.877e-02,8.406e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0119 2.308e-03 5.148 2.630e-07 [7.360e-03,1.641e-02]
alpha[1] 0.0947 8.395e-03 11.279 1.671e-29 [7.823e-02, 0.111]
beta[1] 0.8952 9.310e-03 96.154 0.000 [ 0.877, 0.913]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Enrgy
Iteration: 5, Func. Count: 39, Neg. LLF: 20687.555083514242
Iteration: 10, Func. Count: 75, Neg. LLF: 20676.12575718044
Optimization terminated successfully. (Exit mode 0)
Current function value: 20676.011403865505
Iterations: 14
Function evaluations: 100
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Enrgy R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -20676.0
Distribution: Normal AIC: 41360.0
Method: Maximum Likelihood BIC: 41390.2
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0602 8.078e-03 7.451 9.290e-14 [4.436e-02,7.602e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 5.8579e-03 1.457e-03 4.021 5.784e-05 [3.003e-03,8.713e-03]
alpha[1] 0.0688 9.757e-03 7.055 1.732e-12 [4.971e-02,8.796e-02]
beta[1] 0.9305 8.909e-03 104.446 0.000 [ 0.913, 0.948]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Enrgy
Iteration: 5, Func. Count: 39, Neg. LLF: 20655.682540489353
Iteration: 10, Func. Count: 76, Neg. LLF: 20644.31078795778
Optimization terminated successfully. (Exit mode 0)
Current function value: 20644.2294923583
Iterations: 14
Function evaluations: 101
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Enrgy R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -20644.2
Distribution: Normal AIC: 41296.5
Method: Maximum Likelihood BIC: 41326.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:40 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0583 7.706e-03 7.563 3.944e-14 [4.317e-02,7.338e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 6.2035e-03 1.529e-03 4.057 4.965e-05 [3.207e-03,9.200e-03]
alpha[1] 0.0719 6.924e-03 10.387 2.846e-25 [5.834e-02,8.548e-02]
beta[1] 0.9267 6.816e-03 135.969 0.000 [ 0.913, 0.940]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: HiTec
Iteration: 5, Func. Count: 39, Neg. LLF: 22100.18578679398
Iteration: 10, Func. Count: 74, Neg. LLF: 22093.325669656377
Optimization terminated successfully. (Exit mode 0)
Current function value: 22093.324475802714
Iterations: 13
Function evaluations: 92
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HiTec R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -22093.3
Distribution: Normal AIC: 44194.6
Method: Maximum Likelihood BIC: 44224.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0703 9.317e-03 7.543 4.590e-14 [5.202e-02,8.854e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0225 4.703e-03 4.788 1.681e-06 [1.330e-02,3.174e-02]
alpha[1] 0.0790 1.159e-02 6.819 9.159e-12 [5.633e-02, 0.102]
beta[1] 0.9089 1.247e-02 72.900 0.000 [ 0.885, 0.933]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: HiTec
Iteration: 5, Func. Count: 40, Neg. LLF: 22085.323950806513
Iteration: 10, Func. Count: 75, Neg. LLF: 22074.784183463074
Optimization terminated successfully. (Exit mode 0)
Current function value: 22074.7594343502
Iterations: 14
Function evaluations: 99
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HiTec R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -22074.8
Distribution: Normal AIC: 44157.5
Method: Maximum Likelihood BIC: 44187.7
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0723 8.946e-03 8.086 6.144e-16 [5.481e-02,8.988e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0201 3.308e-03 6.082 1.187e-09 [1.364e-02,2.660e-02]
alpha[1] 0.0772 6.588e-03 11.713 1.090e-31 [6.426e-02,9.008e-02]
beta[1] 0.9119 7.386e-03 123.466 0.000 [ 0.897, 0.926]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Telcm
Iteration: 5, Func. Count: 41, Neg. LLF: 18379.17718654361
Iteration: 10, Func. Count: 75, Neg. LLF: 18375.061039464323
Optimization terminated successfully. (Exit mode 0)
Current function value: 18375.05832635383
Iterations: 12
Function evaluations: 87
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Telcm R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18375.1
Distribution: Normal AIC: 36758.1
Method: Maximum Likelihood BIC: 36788.3
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0510 7.171e-03 7.118 1.099e-12 [3.698e-02,6.509e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0131 4.284e-03 3.069 2.151e-03 [4.749e-03,2.154e-02]
alpha[1] 0.0708 1.531e-02 4.626 3.728e-06 [4.081e-02, 0.101]
beta[1] 0.9171 1.810e-02 50.666 0.000 [ 0.882, 0.953]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Telcm
Iteration: 5, Func. Count: 42, Neg. LLF: 18319.99384100336
Iteration: 10, Func. Count: 75, Neg. LLF: 18318.300934114854
Optimization terminated successfully. (Exit mode 0)
Current function value: 18318.30091563107
Iterations: 11
Function evaluations: 81
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Telcm R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18318.3
Distribution: Normal AIC: 36644.6
Method: Maximum Likelihood BIC: 36674.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0532 7.001e-03 7.598 3.013e-14 [3.947e-02,6.691e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0175 4.295e-03 4.081 4.490e-05 [9.109e-03,2.595e-02]
alpha[1] 0.0949 1.168e-02 8.121 4.631e-16 [7.197e-02, 0.118]
beta[1] 0.8896 1.425e-02 62.426 0.000 [ 0.862, 0.918]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Shops
Iteration: 5, Func. Count: 40, Neg. LLF: 18167.961611201546
Iteration: 10, Func. Count: 72, Neg. LLF: 18166.97256203468
Optimization terminated successfully. (Exit mode 0)
Current function value: 18166.972562037005
Iterations: 10
Function evaluations: 72
Gradient evaluations: 10
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Shops R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18167.0
Distribution: Normal AIC: 36341.9
Method: Maximum Likelihood BIC: 36372.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0666 6.918e-03 9.629 6.059e-22 [5.305e-02,8.017e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0157 2.920e-03 5.364 8.121e-08 [9.942e-03,2.139e-02]
alpha[1] 0.0886 1.036e-02 8.546 1.269e-17 [6.825e-02, 0.109]
beta[1] 0.8970 1.148e-02 78.141 0.000 [ 0.875, 0.920]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Shops
Iteration: 5, Func. Count: 40, Neg. LLF: 18182.531626440355
Iteration: 10, Func. Count: 73, Neg. LLF: 18180.442609289734
Optimization terminated successfully. (Exit mode 0)
Current function value: 18180.442552683864
Iterations: 11
Function evaluations: 79
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Shops R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18180.4
Distribution: Normal AIC: 36368.9
Method: Maximum Likelihood BIC: 36399.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0667 6.932e-03 9.621 6.501e-22 [5.310e-02,8.028e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0144 2.408e-03 5.967 2.413e-09 [9.650e-03,1.909e-02]
alpha[1] 0.0835 6.677e-03 12.504 7.131e-36 [7.040e-02,9.658e-02]
beta[1] 0.9028 7.852e-03 114.964 0.000 [ 0.887, 0.918]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Hlth
Iteration: 5, Func. Count: 40, Neg. LLF: 18780.305461440927
Iteration: 10, Func. Count: 73, Neg. LLF: 18779.18703100809
Optimization terminated successfully. (Exit mode 0)
Current function value: 18779.18703101317
Iterations: 10
Function evaluations: 73
Gradient evaluations: 10
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Hlth R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18779.2
Distribution: Normal AIC: 37566.4
Method: Maximum Likelihood BIC: 37596.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0685 7.306e-03 9.378 6.755e-21 [5.419e-02,8.283e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0158 2.892e-03 5.477 4.323e-08 [1.017e-02,2.151e-02]
alpha[1] 0.0886 1.000e-02 8.858 8.143e-19 [6.900e-02, 0.108]
beta[1] 0.8990 1.057e-02 85.039 0.000 [ 0.878, 0.920]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Hlth
Iteration: 5, Func. Count: 39, Neg. LLF: 18767.9626225076
Iteration: 10, Func. Count: 74, Neg. LLF: 18766.591193656688
Optimization terminated successfully. (Exit mode 0)
Current function value: 18766.591141285186
Iterations: 11
Function evaluations: 80
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Hlth R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18766.6
Distribution: Normal AIC: 37541.2
Method: Maximum Likelihood BIC: 37571.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0727 7.179e-03 10.133 3.949e-24 [5.867e-02,8.681e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0151 2.562e-03 5.885 3.981e-09 [1.006e-02,2.010e-02]
alpha[1] 0.0876 7.072e-03 12.380 3.343e-35 [7.369e-02, 0.101]
beta[1] 0.9003 8.074e-03 111.500 0.000 [ 0.884, 0.916]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Utils
Iteration: 5, Func. Count: 41, Neg. LLF: 13419.736287367752
Iteration: 10, Func. Count: 75, Neg. LLF: 13385.215890929463
Optimization terminated successfully. (Exit mode 0)
Current function value: 13385.17247282786
Iterations: 14
Function evaluations: 101
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Utils R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -13385.2
Distribution: Normal AIC: 26778.3
Method: Maximum Likelihood BIC: 26808.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:41 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0410 4.612e-03 8.898 5.671e-19 [3.200e-02,5.007e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.5660e-03 1.134e-03 3.144 1.669e-03 [1.343e-03,5.789e-03]
alpha[1] 0.1099 1.504e-02 7.310 2.675e-13 [8.045e-02, 0.139]
beta[1] 0.8901 1.478e-02 60.235 0.000 [ 0.861, 0.919]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Utils
Iteration: 5, Func. Count: 41, Neg. LLF: 13396.070041371575
Iteration: 10, Func. Count: 75, Neg. LLF: 13370.608267915399
Optimization terminated successfully. (Exit mode 0)
Current function value: 13370.607276771843
Iterations: 14
Function evaluations: 99
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Utils R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -13370.6
Distribution: Normal AIC: 26749.2
Method: Maximum Likelihood BIC: 26779.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0407 4.790e-03 8.494 1.988e-17 [3.130e-02,5.008e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.2135e-03 8.172e-04 3.932 8.415e-05 [1.612e-03,4.815e-03]
alpha[1] 0.1062 1.040e-02 10.213 1.742e-24 [8.585e-02, 0.127]
beta[1] 0.8938 1.047e-02 85.325 0.000 [ 0.873, 0.914]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Other
Iteration: 5, Func. Count: 40, Neg. LLF: 17982.01533177335
Iteration: 10, Func. Count: 74, Neg. LLF: 17969.968935052333
Optimization terminated successfully. (Exit mode 0)
Current function value: 17969.96753355024
Iterations: 12
Function evaluations: 86
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Other R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17970.0
Distribution: Normal AIC: 35947.9
Method: Maximum Likelihood BIC: 35978.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0765 6.867e-03 11.148 7.336e-29 [6.309e-02,9.001e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0152 3.000e-03 5.066 4.070e-07 [9.318e-03,2.108e-02]
alpha[1] 0.1073 1.298e-02 8.269 1.346e-16 [8.188e-02, 0.133]
beta[1] 0.8812 1.348e-02 65.382 0.000 [ 0.855, 0.908]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Other
Iteration: 5, Func. Count: 40, Neg. LLF: 17955.192082163863
Iteration: 10, Func. Count: 73, Neg. LLF: 17942.172569033573
Optimization terminated successfully. (Exit mode 0)
Current function value: 17942.166998649616
Iterations: 13
Function evaluations: 91
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Other R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17942.2
Distribution: Normal AIC: 35892.3
Method: Maximum Likelihood BIC: 35922.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0766 6.638e-03 11.543 7.963e-31 [6.361e-02,8.964e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0143 2.314e-03 6.165 7.057e-10 [9.729e-03,1.880e-02]
alpha[1] 0.1076 8.649e-03 12.440 1.593e-35 [9.064e-02, 0.125]
beta[1] 0.8813 9.312e-03 94.648 0.000 [ 0.863, 0.900]
============================================================================
Covariance estimator: robust
All factor returns with FORWARD & BACKWARD timeseries (monthly).¶
for column in df_factor_d:
print('***Industry Name (Forward)***: {0}\n'.format(column))
am = arch_model(df_factor_d[column])
res = am.fit(update_freq=5)
print(res.summary())
print('***Industry Name (Reverse)***: {0}\n'.format(column))
am_rev = arch_model(df_factor_d[column][::-1]) # reverse timeseries
res_rev = am_rev.fit(update_freq=5)
print(res_rev.summary())
***Industry Name (Forward)***: Mkt-RF
Iteration: 5, Func. Count: 40, Neg. LLF: 16734.59951173937
Iteration: 10, Func. Count: 76, Neg. LLF: 16725.801446361995
Optimization terminated successfully. (Exit mode 0)
Current function value: 16725.746445889257
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Mkt-RF R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16725.7
Distribution: Normal AIC: 33459.5
Method: Maximum Likelihood BIC: 33489.7
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0484 6.316e-03 7.662 1.836e-14 [3.601e-02,6.077e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.3982e-03 2.111e-03 4.452 8.510e-06 [5.261e-03,1.354e-02]
alpha[1] 0.0917 1.139e-02 8.053 8.068e-16 [6.942e-02, 0.114]
beta[1] 0.9004 1.145e-02 78.648 0.000 [ 0.878, 0.923]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Mkt-RF
Iteration: 5, Func. Count: 40, Neg. LLF: 16687.817315938606
Iteration: 10, Func. Count: 75, Neg. LLF: 16678.201068432514
Optimization terminated successfully. (Exit mode 0)
Current function value: 16678.17884317169
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Mkt-RF R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16678.2
Distribution: Normal AIC: 33364.4
Method: Maximum Likelihood BIC: 33394.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0502 5.853e-03 8.581 9.373e-18 [3.875e-02,6.169e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 8.2194e-03 1.619e-03 5.076 3.864e-07 [5.045e-03,1.139e-02]
alpha[1] 0.0962 7.825e-03 12.289 1.033e-34 [8.083e-02, 0.111]
beta[1] 0.8977 8.102e-03 110.808 0.000 [ 0.882, 0.914]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: SMB
Iteration: 5, Func. Count: 38, Neg. LLF: 8709.502871702567
Iteration: 10, Func. Count: 75, Neg. LLF: 8706.210621517967
Optimization terminated successfully. (Exit mode 0)
Current function value: 8706.209422257236
Iterations: 12
Function evaluations: 87
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: SMB R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -8706.21
Distribution: Normal AIC: 17420.4
Method: Maximum Likelihood BIC: 17450.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0123 3.694e-03 3.330 8.680e-04 [5.062e-03,1.954e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.2394e-03 4.711e-04 4.753 2.000e-06 [1.316e-03,3.163e-03]
alpha[1] 0.0859 9.077e-03 9.465 2.931e-21 [6.812e-02, 0.104]
beta[1] 0.9092 8.936e-03 101.747 0.000 [ 0.892, 0.927]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: SMB
Iteration: 5, Func. Count: 41, Neg. LLF: 8733.307477367558
Iteration: 10, Func. Count: 77, Neg. LLF: 8725.16724146458
Optimization terminated successfully. (Exit mode 0)
Current function value: 8725.166321820576
Iterations: 11
Function evaluations: 83
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: SMB R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -8725.17
Distribution: Normal AIC: 17458.3
Method: Maximum Likelihood BIC: 17488.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0107 3.765e-03 2.833 4.611e-03 [3.287e-03,1.804e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.3706e-03 5.043e-04 4.701 2.594e-06 [1.382e-03,3.359e-03]
alpha[1] 0.0890 8.614e-03 10.327 5.320e-25 [7.208e-02, 0.106]
beta[1] 0.9056 8.567e-03 105.702 0.000 [ 0.889, 0.922]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: HML
Iteration: 5, Func. Count: 40, Neg. LLF: 6596.831658066217
Iteration: 10, Func. Count: 75, Neg. LLF: 6573.218398198052
Optimization terminated successfully. (Exit mode 0)
Current function value: 6572.819132932525
Iterations: 14
Function evaluations: 101
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HML R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -6572.82
Distribution: Normal AIC: 13153.6
Method: Maximum Likelihood BIC: 13183.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:42 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 9.8457e-03 2.993e-03 3.289 1.005e-03 [3.979e-03,1.571e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.0469e-03 4.004e-04 5.113 3.178e-07 [1.262e-03,2.832e-03]
alpha[1] 0.0958 9.885e-03 9.692 3.277e-22 [7.642e-02, 0.115]
beta[1] 0.8963 1.055e-02 84.927 0.000 [ 0.876, 0.917]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: HML
Iteration: 5, Func. Count: 44, Neg. LLF: 6648.109438172432
Iteration: 10, Func. Count: 80, Neg. LLF: 6604.093721414287
Iteration: 15, Func. Count: 114, Neg. LLF: 6601.908658586344
Optimization terminated successfully. (Exit mode 0)
Current function value: 6601.908200694622
Iterations: 18
Function evaluations: 126
Gradient evaluations: 17
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HML R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -6601.91
Distribution: Normal AIC: 13211.8
Method: Maximum Likelihood BIC: 13242.0
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 9.5113e-03 3.037e-03 3.132 1.735e-03 [3.560e-03,1.546e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 1.9129e-03 3.797e-04 5.038 4.713e-07 [1.169e-03,2.657e-03]
alpha[1] 0.0909 8.756e-03 10.377 3.162e-25 [7.369e-02, 0.108]
beta[1] 0.9014 9.763e-03 92.320 0.000 [ 0.882, 0.921]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: RMW
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 2371.7406000324763
Iterations: 6
Function evaluations: 18
Gradient evaluations: 2
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RMW R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -2371.74
Distribution: Normal AIC: 4751.48
Method: Maximum Likelihood BIC: 4781.65
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0117 2.055e-03 5.686 1.302e-08 [7.656e-03,1.571e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.6907e-03 8.369e-04 3.215 1.304e-03 [1.050e-03,4.331e-03]
alpha[1] 0.1000 1.500e-02 6.666 2.625e-11 [7.060e-02, 0.129]
beta[1] 0.8800 2.061e-02 42.701 0.000 [ 0.840, 0.920]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Reverse)***: RMW
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 2374.640197600779
Iterations: 5
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RMW R-squared: 0.000
Mean Model: Constant Mean Adj. R-squared: 0.000
Vol Model: GARCH Log-Likelihood: -2374.64
Distribution: Normal AIC: 4757.28
Method: Maximum Likelihood BIC: 4787.45
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0130 2.043e-03 6.369 1.902e-10 [9.007e-03,1.701e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 2.6907e-03 6.725e-04 4.001 6.299e-05 [1.373e-03,4.009e-03]
alpha[1] 0.1000 1.254e-02 7.978 1.491e-15 [7.543e-02, 0.125]
beta[1] 0.8800 1.658e-02 53.063 0.000 [ 0.847, 0.913]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Forward)***: CMA
Iteration: 5, Func. Count: 48, Neg. LLF: 3118.4188717669335
Positive directional derivative for linesearch (Exit mode 8)
Current function value: 3108.0255270368143
Iterations: 12
Function evaluations: 74
Gradient evaluations: 8
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: CMA R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -3108.03
Distribution: Normal AIC: 6224.05
Method: Maximum Likelihood BIC: 6254.22
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 6.2631e-03 2.344e-03 2.672 7.533e-03 [1.670e-03,1.086e-02]
Volatility Model
=============================================================================
coef std err t P>|t| 95.0% Conf. Int.
-----------------------------------------------------------------------------
omega 2.1592e-03 5.019e-03 0.430 0.667 [-7.679e-03,1.200e-02]
alpha[1] 0.0809 8.444e-02 0.958 0.338 [-8.464e-02, 0.246]
beta[1] 0.9006 0.127 7.113 1.136e-12 [ 0.652, 1.149]
=============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Positive directional derivative for linesearch. See convergence_flag.
***Industry Name (Reverse)***: CMA
C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning) C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning) C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 8. The message is: Positive directional derivative for linesearch See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning)
Iteration: 5, Func. Count: 42, Neg. LLF: 3113.6414223355587
Iteration: 10, Func. Count: 87, Neg. LLF: 3096.0215680249485
Iteration: 15, Func. Count: 120, Neg. LLF: 3092.3128338652205
Optimization terminated successfully. (Exit mode 0)
Current function value: 3092.3122521318437
Iterations: 19
Function evaluations: 138
Gradient evaluations: 18
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: CMA R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -3092.31
Distribution: Normal AIC: 6192.62
Method: Maximum Likelihood BIC: 6222.79
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 6.2904e-03 2.364e-03 2.661 7.785e-03 [1.658e-03,1.092e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.5973e-04 2.496e-04 3.846 1.202e-04 [4.706e-04,1.449e-03]
alpha[1] 0.0671 9.068e-03 7.404 1.325e-13 [4.936e-02,8.491e-02]
beta[1] 0.9250 1.029e-02 89.902 0.000 [ 0.905, 0.945]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: RF
Inequality constraints incompatible (Exit mode 4)
Current function value: -48479.902615081635
Iterations: 1
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RF R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: 48479.9
Distribution: Normal AIC: -96951.8
Method: Maximum Likelihood BIC: -96921.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0182 9.576e-09 1.899e+06 0.000 [1.818e-02,1.818e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.1427e-06 7.494e-13 4.193e+06 0.000 [3.143e-06,3.143e-06]
alpha[1] 0.2000 2.237e-03 89.422 0.000 [ 0.196, 0.204]
beta[1] 0.7800 2.045e-03 381.500 0.000 [ 0.776, 0.784]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Inequality constraints incompatible. See convergence_flag.
***Industry Name (Reverse)***: RF
Inequality constraints incompatible (Exit mode 4)
Current function value: -48478.55702360397
Iterations: 1
Function evaluations: 6
Gradient evaluations: 1
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: RF R-squared: 0.000
Mean Model: Constant Mean Adj. R-squared: 0.000
Vol Model: GARCH Log-Likelihood: 48478.6
Distribution: Normal AIC: -96949.1
Method: Maximum Likelihood BIC: -96918.9
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0182 1.018e-08 1.787e+06 0.000 [1.818e-02,1.818e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.1427e-06 1.077e-12 2.918e+06 0.000 [3.143e-06,3.143e-06]
alpha[1] 0.2000 2.263e-03 88.369 0.000 [ 0.196, 0.204]
beta[1] 0.7800 2.079e-03 375.105 0.000 [ 0.776, 0.784]
============================================================================
Covariance estimator: robust
WARNING: The optimizer did not indicate successful convergence. The message was
Inequality constraints incompatible. See convergence_flag.
***Industry Name (Forward)***: MKT
Iteration: 5, Func. Count: 40, Neg. LLF: 16731.492832095857
C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 4. The message is: Inequality constraints incompatible See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning) C:\Users\randl\Anaconda3\envs\nikola\lib\site-packages\arch\univariate\base.py:571: ConvergenceWarning: The optimizer returned code 4. The message is: Inequality constraints incompatible See scipy.optimize.fmin_slsqp for code meaning. ConvergenceWarning)
Iteration: 10, Func. Count: 76, Neg. LLF: 16722.656929069963
Optimization terminated successfully. (Exit mode 0)
Current function value: 16722.5951086026
Iterations: 13
Function evaluations: 94
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16722.6
Distribution: Normal AIC: 33453.2
Method: Maximum Likelihood BIC: 33483.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0658 6.290e-03 10.463 1.273e-25 [5.348e-02,7.814e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 9.3880e-03 2.104e-03 4.462 8.124e-06 [5.264e-03,1.351e-02]
alpha[1] 0.0917 1.140e-02 8.049 8.364e-16 [6.941e-02, 0.114]
beta[1] 0.9005 1.144e-02 78.703 0.000 [ 0.878, 0.923]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: MKT
Iteration: 5, Func. Count: 40, Neg. LLF: 16684.236263530434
Iteration: 10, Func. Count: 75, Neg. LLF: 16674.60452658196
Optimization terminated successfully. (Exit mode 0)
Current function value: 16674.586540367545
Iterations: 12
Function evaluations: 88
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: MKT R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -16674.6
Distribution: Normal AIC: 33357.2
Method: Maximum Likelihood BIC: 33387.3
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0677 5.844e-03 11.592 4.543e-31 [5.628e-02,7.919e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 8.2528e-03 1.629e-03 5.066 4.065e-07 [5.060e-03,1.145e-02]
alpha[1] 0.0963 7.864e-03 12.247 1.734e-34 [8.090e-02, 0.112]
beta[1] 0.8976 8.147e-03 110.171 0.000 [ 0.882, 0.914]
============================================================================
Covariance estimator: robust
All industry indices with FORWARD & BACKWARD timeseries (monthly).¶
for column in df_industry_d:
print('***Industry Name (Forward)***: {0}\n'.format(column))
am = arch_model(df_industry_d[column])
res = am.fit(update_freq=5)
print(res.summary())
print('***Industry Name (Reverse)***: {0}\n'.format(column))
am_rev = arch_model(df_industry_d[column][::-1]) # reverse timeseries
res_rev = am_rev.fit(update_freq=5)
print(res_rev.summary())
***Industry Name (Forward)***: NoDur
Iteration: 5, Func. Count: 41, Neg. LLF: 15492.705944464738
Iteration: 10, Func. Count: 78, Neg. LLF: 15485.169967829474
Optimization terminated successfully. (Exit mode 0)
Current function value: 15485.169958165197
Iterations: 11
Function evaluations: 84
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: NoDur R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -15485.2
Distribution: Normal AIC: 30978.3
Method: Maximum Likelihood BIC: 31008.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:43 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0640 5.675e-03 11.272 1.794e-29 [5.284e-02,7.509e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 7.3524e-03 1.782e-03 4.126 3.688e-05 [3.860e-03,1.084e-02]
alpha[1] 0.0860 1.076e-02 7.998 1.268e-15 [6.494e-02, 0.107]
beta[1] 0.9068 1.146e-02 79.114 0.000 [ 0.884, 0.929]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: NoDur
Iteration: 5, Func. Count: 42, Neg. LLF: 15464.406710982443
Iteration: 10, Func. Count: 77, Neg. LLF: 15456.689089630043
Optimization terminated successfully. (Exit mode 0)
Current function value: 15456.689069506094
Iterations: 11
Function evaluations: 83
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: NoDur R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -15456.7
Distribution: Normal AIC: 30921.4
Method: Maximum Likelihood BIC: 30951.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0655 5.650e-03 11.590 4.628e-31 [5.441e-02,7.656e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 7.4178e-03 1.497e-03 4.954 7.263e-07 [4.483e-03,1.035e-02]
alpha[1] 0.0905 8.127e-03 11.141 7.915e-29 [7.462e-02, 0.106]
beta[1] 0.9019 8.649e-03 104.279 0.000 [ 0.885, 0.919]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Durbl
Iteration: 5, Func. Count: 38, Neg. LLF: 21384.246812287965
Iteration: 10, Func. Count: 73, Neg. LLF: 21381.881872802725
Optimization terminated successfully. (Exit mode 0)
Current function value: 21381.881254907657
Iterations: 12
Function evaluations: 85
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Durbl R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -21381.9
Distribution: Normal AIC: 42771.8
Method: Maximum Likelihood BIC: 42801.9
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0568 8.802e-03 6.448 1.135e-10 [3.950e-02,7.400e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0205 4.385e-03 4.666 3.064e-06 [1.187e-02,2.906e-02]
alpha[1] 0.0702 9.433e-03 7.438 1.019e-13 [5.168e-02,8.865e-02]
beta[1] 0.9171 1.080e-02 84.902 0.000 [ 0.896, 0.938]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Durbl
Iteration: 5, Func. Count: 38, Neg. LLF: 21364.42571610683
Iteration: 10, Func. Count: 74, Neg. LLF: 21357.710255264654
Optimization terminated successfully. (Exit mode 0)
Current function value: 21357.693334789055
Iterations: 13
Function evaluations: 92
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Durbl R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -21357.7
Distribution: Normal AIC: 42723.4
Method: Maximum Likelihood BIC: 42753.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0565 8.808e-03 6.412 1.438e-10 [3.921e-02,7.374e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0204 3.466e-03 5.881 4.073e-09 [1.359e-02,2.718e-02]
alpha[1] 0.0735 6.489e-03 11.330 9.340e-30 [6.080e-02,8.624e-02]
beta[1] 0.9135 7.639e-03 119.590 0.000 [ 0.899, 0.929]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Manuf
Iteration: 5, Func. Count: 42, Neg. LLF: 17662.95692593312
Iteration: 10, Func. Count: 76, Neg. LLF: 17657.425862615026
Optimization terminated successfully. (Exit mode 0)
Current function value: 17657.425815186456
Iterations: 11
Function evaluations: 82
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Manuf R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17657.4
Distribution: Normal AIC: 35322.9
Method: Maximum Likelihood BIC: 35353.0
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0702 6.870e-03 10.220 1.612e-24 [5.675e-02,8.368e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0125 2.823e-03 4.445 8.781e-06 [7.016e-03,1.808e-02]
alpha[1] 0.0912 1.310e-02 6.961 3.376e-12 [6.552e-02, 0.117]
beta[1] 0.8982 1.359e-02 66.077 0.000 [ 0.872, 0.925]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Manuf
Iteration: 5, Func. Count: 42, Neg. LLF: 17625.74310704491
Iteration: 10, Func. Count: 76, Neg. LLF: 17619.205897060987
Optimization terminated successfully. (Exit mode 0)
Current function value: 17619.205853753512
Iterations: 11
Function evaluations: 82
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Manuf R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17619.2
Distribution: Normal AIC: 35246.4
Method: Maximum Likelihood BIC: 35276.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0714 6.453e-03 11.067 1.817e-28 [5.877e-02,8.406e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0119 2.308e-03 5.148 2.630e-07 [7.360e-03,1.641e-02]
alpha[1] 0.0947 8.395e-03 11.279 1.671e-29 [7.823e-02, 0.111]
beta[1] 0.8952 9.310e-03 96.154 0.000 [ 0.877, 0.913]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Enrgy
Iteration: 5, Func. Count: 39, Neg. LLF: 20687.555083514242
Iteration: 10, Func. Count: 75, Neg. LLF: 20676.12575718044
Optimization terminated successfully. (Exit mode 0)
Current function value: 20676.011403865505
Iterations: 14
Function evaluations: 100
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Enrgy R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -20676.0
Distribution: Normal AIC: 41360.0
Method: Maximum Likelihood BIC: 41390.2
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0602 8.078e-03 7.451 9.290e-14 [4.436e-02,7.602e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 5.8579e-03 1.457e-03 4.021 5.784e-05 [3.003e-03,8.713e-03]
alpha[1] 0.0688 9.757e-03 7.055 1.732e-12 [4.971e-02,8.796e-02]
beta[1] 0.9305 8.909e-03 104.446 0.000 [ 0.913, 0.948]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Enrgy
Iteration: 5, Func. Count: 39, Neg. LLF: 20655.682540489353
Iteration: 10, Func. Count: 76, Neg. LLF: 20644.31078795778
Optimization terminated successfully. (Exit mode 0)
Current function value: 20644.2294923583
Iterations: 14
Function evaluations: 101
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Enrgy R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -20644.2
Distribution: Normal AIC: 41296.5
Method: Maximum Likelihood BIC: 41326.6
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:44 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0583 7.706e-03 7.563 3.944e-14 [4.317e-02,7.338e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 6.2035e-03 1.529e-03 4.057 4.965e-05 [3.207e-03,9.200e-03]
alpha[1] 0.0719 6.924e-03 10.387 2.846e-25 [5.834e-02,8.548e-02]
beta[1] 0.9267 6.816e-03 135.969 0.000 [ 0.913, 0.940]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: HiTec
Iteration: 5, Func. Count: 39, Neg. LLF: 22100.18578679398
Iteration: 10, Func. Count: 74, Neg. LLF: 22093.325669656377
Optimization terminated successfully. (Exit mode 0)
Current function value: 22093.324475802714
Iterations: 13
Function evaluations: 92
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HiTec R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -22093.3
Distribution: Normal AIC: 44194.6
Method: Maximum Likelihood BIC: 44224.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0703 9.317e-03 7.543 4.590e-14 [5.202e-02,8.854e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0225 4.703e-03 4.788 1.681e-06 [1.330e-02,3.174e-02]
alpha[1] 0.0790 1.159e-02 6.819 9.159e-12 [5.633e-02, 0.102]
beta[1] 0.9089 1.247e-02 72.900 0.000 [ 0.885, 0.933]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: HiTec
Iteration: 5, Func. Count: 40, Neg. LLF: 22085.323950806513
Iteration: 10, Func. Count: 75, Neg. LLF: 22074.784183463074
Optimization terminated successfully. (Exit mode 0)
Current function value: 22074.7594343502
Iterations: 14
Function evaluations: 99
Gradient evaluations: 14
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: HiTec R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -22074.8
Distribution: Normal AIC: 44157.5
Method: Maximum Likelihood BIC: 44187.7
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0723 8.946e-03 8.086 6.144e-16 [5.481e-02,8.988e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0201 3.308e-03 6.082 1.187e-09 [1.364e-02,2.660e-02]
alpha[1] 0.0772 6.588e-03 11.713 1.090e-31 [6.426e-02,9.008e-02]
beta[1] 0.9119 7.386e-03 123.466 0.000 [ 0.897, 0.926]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Telcm
Iteration: 5, Func. Count: 41, Neg. LLF: 18379.17718654361
Iteration: 10, Func. Count: 75, Neg. LLF: 18375.061039464323
Optimization terminated successfully. (Exit mode 0)
Current function value: 18375.05832635383
Iterations: 12
Function evaluations: 87
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Telcm R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18375.1
Distribution: Normal AIC: 36758.1
Method: Maximum Likelihood BIC: 36788.3
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0510 7.171e-03 7.118 1.099e-12 [3.698e-02,6.509e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0131 4.284e-03 3.069 2.151e-03 [4.749e-03,2.154e-02]
alpha[1] 0.0708 1.531e-02 4.626 3.728e-06 [4.081e-02, 0.101]
beta[1] 0.9171 1.810e-02 50.666 0.000 [ 0.882, 0.953]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Telcm
Iteration: 5, Func. Count: 42, Neg. LLF: 18319.99384100336
Iteration: 10, Func. Count: 75, Neg. LLF: 18318.300934114854
Optimization terminated successfully. (Exit mode 0)
Current function value: 18318.30091563107
Iterations: 11
Function evaluations: 81
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Telcm R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18318.3
Distribution: Normal AIC: 36644.6
Method: Maximum Likelihood BIC: 36674.8
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0532 7.001e-03 7.598 3.013e-14 [3.947e-02,6.691e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0175 4.295e-03 4.081 4.490e-05 [9.109e-03,2.595e-02]
alpha[1] 0.0949 1.168e-02 8.121 4.631e-16 [7.197e-02, 0.118]
beta[1] 0.8896 1.425e-02 62.426 0.000 [ 0.862, 0.918]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Shops
Iteration: 5, Func. Count: 40, Neg. LLF: 18167.961611201546
Iteration: 10, Func. Count: 72, Neg. LLF: 18166.97256203468
Optimization terminated successfully. (Exit mode 0)
Current function value: 18166.972562037005
Iterations: 10
Function evaluations: 72
Gradient evaluations: 10
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Shops R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18167.0
Distribution: Normal AIC: 36341.9
Method: Maximum Likelihood BIC: 36372.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0666 6.918e-03 9.629 6.059e-22 [5.305e-02,8.017e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0157 2.920e-03 5.364 8.121e-08 [9.942e-03,2.139e-02]
alpha[1] 0.0886 1.036e-02 8.546 1.269e-17 [6.825e-02, 0.109]
beta[1] 0.8970 1.148e-02 78.141 0.000 [ 0.875, 0.920]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Shops
Iteration: 5, Func. Count: 40, Neg. LLF: 18182.531626440355
Iteration: 10, Func. Count: 73, Neg. LLF: 18180.442609289734
Optimization terminated successfully. (Exit mode 0)
Current function value: 18180.442552683864
Iterations: 11
Function evaluations: 79
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Shops R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18180.4
Distribution: Normal AIC: 36368.9
Method: Maximum Likelihood BIC: 36399.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0667 6.932e-03 9.621 6.501e-22 [5.310e-02,8.028e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0144 2.408e-03 5.967 2.413e-09 [9.650e-03,1.909e-02]
alpha[1] 0.0835 6.677e-03 12.504 7.131e-36 [7.040e-02,9.658e-02]
beta[1] 0.9028 7.852e-03 114.964 0.000 [ 0.887, 0.918]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Hlth
Iteration: 5, Func. Count: 40, Neg. LLF: 18780.305461440927
Iteration: 10, Func. Count: 73, Neg. LLF: 18779.18703100809
Optimization terminated successfully. (Exit mode 0)
Current function value: 18779.18703101317
Iterations: 10
Function evaluations: 73
Gradient evaluations: 10
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Hlth R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18779.2
Distribution: Normal AIC: 37566.4
Method: Maximum Likelihood BIC: 37596.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0685 7.306e-03 9.378 6.755e-21 [5.419e-02,8.283e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0158 2.892e-03 5.477 4.323e-08 [1.017e-02,2.151e-02]
alpha[1] 0.0886 1.000e-02 8.858 8.143e-19 [6.900e-02, 0.108]
beta[1] 0.8990 1.057e-02 85.039 0.000 [ 0.878, 0.920]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Hlth
Iteration: 5, Func. Count: 39, Neg. LLF: 18767.9626225076
Iteration: 10, Func. Count: 74, Neg. LLF: 18766.591193656688
Optimization terminated successfully. (Exit mode 0)
Current function value: 18766.591141285186
Iterations: 11
Function evaluations: 80
Gradient evaluations: 11
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Hlth R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -18766.6
Distribution: Normal AIC: 37541.2
Method: Maximum Likelihood BIC: 37571.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:45 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0727 7.179e-03 10.133 3.949e-24 [5.867e-02,8.681e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0151 2.562e-03 5.885 3.981e-09 [1.006e-02,2.010e-02]
alpha[1] 0.0876 7.072e-03 12.380 3.343e-35 [7.369e-02, 0.101]
beta[1] 0.9003 8.074e-03 111.500 0.000 [ 0.884, 0.916]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Utils
Iteration: 5, Func. Count: 41, Neg. LLF: 13419.736287367752
Iteration: 10, Func. Count: 75, Neg. LLF: 13385.215890929463
Optimization terminated successfully. (Exit mode 0)
Current function value: 13385.17247282786
Iterations: 14
Function evaluations: 101
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Utils R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -13385.2
Distribution: Normal AIC: 26778.3
Method: Maximum Likelihood BIC: 26808.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:46 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0410 4.612e-03 8.898 5.671e-19 [3.200e-02,5.007e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.5660e-03 1.134e-03 3.144 1.669e-03 [1.343e-03,5.789e-03]
alpha[1] 0.1099 1.504e-02 7.310 2.675e-13 [8.045e-02, 0.139]
beta[1] 0.8901 1.478e-02 60.235 0.000 [ 0.861, 0.919]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Utils
Iteration: 5, Func. Count: 41, Neg. LLF: 13396.070041371575
Iteration: 10, Func. Count: 75, Neg. LLF: 13370.608267915399
Optimization terminated successfully. (Exit mode 0)
Current function value: 13370.607276771843
Iterations: 14
Function evaluations: 99
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Utils R-squared: -0.000
Mean Model: Constant Mean Adj. R-squared: -0.000
Vol Model: GARCH Log-Likelihood: -13370.6
Distribution: Normal AIC: 26749.2
Method: Maximum Likelihood BIC: 26779.4
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:46 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0407 4.790e-03 8.494 1.988e-17 [3.130e-02,5.008e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 3.2135e-03 8.172e-04 3.932 8.415e-05 [1.612e-03,4.815e-03]
alpha[1] 0.1062 1.040e-02 10.213 1.742e-24 [8.585e-02, 0.127]
beta[1] 0.8938 1.047e-02 85.325 0.000 [ 0.873, 0.914]
============================================================================
Covariance estimator: robust
***Industry Name (Forward)***: Other
Iteration: 5, Func. Count: 40, Neg. LLF: 17982.01533177335
Iteration: 10, Func. Count: 74, Neg. LLF: 17969.968935052333
Optimization terminated successfully. (Exit mode 0)
Current function value: 17969.96753355024
Iterations: 12
Function evaluations: 86
Gradient evaluations: 12
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Other R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17970.0
Distribution: Normal AIC: 35947.9
Method: Maximum Likelihood BIC: 35978.1
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:46 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0765 6.867e-03 11.148 7.336e-29 [6.309e-02,9.001e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0152 3.000e-03 5.066 4.070e-07 [9.318e-03,2.108e-02]
alpha[1] 0.1073 1.298e-02 8.269 1.346e-16 [8.188e-02, 0.133]
beta[1] 0.8812 1.348e-02 65.382 0.000 [ 0.855, 0.908]
============================================================================
Covariance estimator: robust
***Industry Name (Reverse)***: Other
Iteration: 5, Func. Count: 40, Neg. LLF: 17955.192082163863
Iteration: 10, Func. Count: 73, Neg. LLF: 17942.172569033573
Optimization terminated successfully. (Exit mode 0)
Current function value: 17942.166998649616
Iterations: 13
Function evaluations: 91
Gradient evaluations: 13
Constant Mean - GARCH Model Results
==============================================================================
Dep. Variable: Other R-squared: -0.001
Mean Model: Constant Mean Adj. R-squared: -0.001
Vol Model: GARCH Log-Likelihood: -17942.2
Distribution: Normal AIC: 35892.3
Method: Maximum Likelihood BIC: 35922.5
No. Observations: 13932
Date: Mon, Jan 07 2019 Df Residuals: 13928
Time: 11:52:46 Df Model: 4
Mean Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
mu 0.0766 6.638e-03 11.543 7.963e-31 [6.361e-02,8.964e-02]
Volatility Model
============================================================================
coef std err t P>|t| 95.0% Conf. Int.
----------------------------------------------------------------------------
omega 0.0143 2.314e-03 6.165 7.057e-10 [9.729e-03,1.880e-02]
alpha[1] 0.1076 8.649e-03 12.440 1.593e-35 [9.064e-02, 0.125]
beta[1] 0.8813 9.312e-03 94.648 0.000 [ 0.863, 0.900]
============================================================================
Covariance estimator: robust
Conclusion¶
As can be seen from the above results for both market returns (and other factor returns), and industry indices, there does not seem to be clear evidence that fitting a GARCH model on a reversed time series results in substantially poorer model fits. Although there is a possibility that there is an error with the package or GARCH model code, this remains unlikely as the package is written by Kevin Sheppard from Oxford University (who was also an ex-PhD student of Nobel Prize winner, Prof. Robert Engle of NYU-Stern School of Business). Our testing has covered both daily and monthly datasets from a reliable data source (i.e., Ken French's website).
Furthermore, as our tests cover both factor and industry returns, we observe that the GARCH model parameters are not necessarily whole numbers. We have also used a simple GARCH model with a constant mean and normal error distribution.
Comments
Comments powered by Disqus